InterviewSolution
Saved Bookmarks
| 1. |
How to prevent the ClassCastExceptions?(a) By using instanceof(b) By using is-a check(c) By using arrow operator with check function(d) By checking type of conversionI have been asked this question during an interview.The above asked question is from Downcasting topic in portion Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming |
|
Answer» Right CHOICE is (a) By using INSTANCEOF |
|