Polymorphism is the capability of an action or method to do different things based on the object that it is acting upon.
There are two types of polymorphism:-
- Method Polymorphism through overloading.
- Object polymorphism by inheritance / interfaces.