Hello all,
I am reading through a Java book. It says that given the following code:
Oldtype ot;
Newtype nt;
nt = (Newtype)ot;
where OldType and Newtype are both interfaces, this is almost always going to pass Compile time rules. It says the case(s) that won't pass are obscure, but does not give any other details. Can anyone shed some light on the case(s) that won't pass compile time rules in these circumstances?
Thanks in advance.
I am reading through a Java book. It says that given the following code:
Oldtype ot;
Newtype nt;
nt = (Newtype)ot;
where OldType and Newtype are both interfaces, this is almost always going to pass Compile time rules. It says the case(s) that won't pass are obscure, but does not give any other details. Can anyone shed some light on the case(s) that won't pass compile time rules in these circumstances?
Thanks in advance.