Hi,
Using Parent class reference variable you can only access the methods of the child class, parent class is known of. In other words the Parent class only have information of the methods it is having so at run time if the Parent class reference variable holds reference of the Child class instance,
polymorphism is achieved by calling child class methods using Parent class reference variable.
You do downcast in the case you have to access the Child class specific methods using Parent class reference but you may recall,
you should do instanceof
test before doing so to make yourself confirmed YEAH the Parent class reference refers to Child class. Here compiler relies on you to downcast, So be faithful, do instanceof test and then do downcast to access the Child class specific method.
Downcast is must because using Parent class reference you are only able to access Parent class methods polymorphically on the Child class object.
Did I miss something!
Thanks and Regards,
cmbhatt