1.

Java supports direct downcasting.(a) True(b) FalseThis question was addressed to me in unit test.The origin of the question is Downcasting in section Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming

Answer»

Correct option is (b) False

The BEST explanation: The downcasting is not possible in java directly. This has to be done explicitly. The downcasting is not SAFE but can be checked for safe casting USING instanceof FUNCTION.



Discussion

No Comment Found

Related InterviewSolutions