0% found this document useful (0 votes)
6 views

Polymorphism

The document discusses polymorphism in programming, specifically focusing on method overloading and overriding. It highlights how the show() method can be overloaded with one parameter and explains runtime polymorphism, where a class may call a method from a subclass if it's not available in the parent class. The search for the method occurs from right to left in the class hierarchy.

Uploaded by

Shiva Ram Vemula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Polymorphism

The document discusses polymorphism in programming, specifically focusing on method overloading and overriding. It highlights how the show() method can be overloaded with one parameter and explains runtime polymorphism, where a class may call a method from a subclass if it's not available in the parent class. The search for the method occurs from right to left in the class hierarchy.

Uploaded by

Shiva Ram Vemula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Polymorphism

we are overloading the show() method with one parameter know as method overloading
method overriding

runtime polymorphism
here if in ram class show method is not available then it will print shiva class method

It searches from right to left

You might also like