Polymorphism

Subclasses can define their own behaviors and yet share some of the same functionality of the parent class.
Compile time polymorphism -- Method overloading
Class can have more than one method with the same name, but with different parameters
Run time polymorphism - Method overriding
An instance method in a subclass with the same signature (name, plus the number and the type of its parameters) and return type as an instance method in the superclass overrides the superclass's method.
Comments