Polymorphism is one of three object oriented concepts. The other two are abstraction and inheritance. Run time polymorphism is a way to decide which method to call depending upon the state (variables) of the program.
The following program demonstrates the run time polymorphism.
class B method called.
Here we have created 3 classes -
THINGS TO TRY