1.

Upcasting and downcasting objects are the same as casting primitive types.(a) True(b) FalseThe question was posed to me in my homework.My query is from Upcasting topic in portion Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming

Answer»

Right option is (b) False

Easy explanation - It is a bit confusing concept since both casting CONCEPTS are different. Primitive casting DEPENDS on the TYPE and size of DATA being typecast. Whereas in objects casting, the classes and inheritance order plays a big role.



Discussion

No Comment Found

Related InterviewSolutions