Computer Science, asked by ashu0itkm, 4 months ago

what is the use of the reference of parent class to asign sub class object?? ​

Answers

Answered by bharathinarava
0

Answer:

First approach (Referencing using Superclass reference): A reference variable of a superclass can be used to a refer any subclass object derived from that superclass. If the methods are present in SuperClass, but overridden by SubClass, it will be the overridden method that will be executed.

Explanation:

Please give my answer as branilist answer

Answered by prapti200447
0

First approach (Referencing using Superclass reference): A reference variable of a superclass can be used to a refer any subclass object derived from that superclass. If the methods are present in SuperClass, but overridden by SubClass, it will be the overridden method that will be executed.

I hope it help you..

have a great day ahead

Similar questions