Hi Experts,
http://scn.sap.com/thread/3310329
I read the above posting to understand especially downcasting (widening casting ?=).
How I need to understand it generally?
subclass ?= superclass.
With widening casting (Downcasting) = accesing/calling the methods of subclass to runtime.
Which method is called? Method of subclass or superclass?
If so, with the refrence "subclass" it is anyway possible to access to its methods. Why this casting??
With upcasting (Narrow Casting ) = accesing/calling the methods of superclass
superclass = subclass.
With the refrence "superclass" I am calling the methods of superclass.
Is that right?
Which method is called? Method of superclass or subclass ?
Please correct me if I have misunderstood, it is very important to clarify me on this topic. I would be very grateful to everybody.
Regards
Alex