Dynamic Polymorphism

Learn about the concept of dynamic polymorphism.

What is dynamic polymorphism?

Dynamic polymorphism is the mechanism by which methods can be defined with the same name, return type, and parameters in the base class and derived classes.

The call to an overridden method is decided at the runtime.

Dynamic polymorphism example

Let’s consider the example of the Shape class:

Get hands-on with 1200+ tech skills courses.