| Author |
instanceof and casts
|
Anna Dow
Greenhorn
Joined: Jun 04, 2002
Posts: 18
|
|
Hi, all, here is my question: It looks that if returned true, then the cast is always possible. (That is, the code like: will never give a ClassCastException.) Is it true ? Thanks, Anna
|
 |
Gautam Sewani
Ranch Hand
Joined: Apr 19, 2002
Posts: 93
|
|
Yeah thats true. But the code which you gave wont compile coz you didn't use the if statement properly should be made Regards Gautam
|
 |
 |
|
|
subject: instanceof and casts
|
|
|