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.
Run Time Polymorphism CODE class RunTimePolymorphism OUTPUT class B method called. DESCRIPTION Here we have created 3 classes - THINGS TO TRY
|