Polymorphism - Methods Overriding v/s Hiding

Опубликовано: 11 Октябрь 2024
на канале: ProgRank
287
7

In method overriding, when base class reference variable pointing to the object of the derived class, then it will call the overridden method in the derived class. In the method hiding, when base class reference variable pointing to the object of the derived class, then it will call the hidden method in the base class.

#oop #java #interviewquestions