method overriding

Method overriding allows a subclass to override a method in a superclass. The method in the subclass has same name, same parameters, and same return type as the method in the superclass.
Method overriding is used for runtime polymorphism. A call to an overridden method is resolved at run time, rather than compile time, this is called dynamic binding. 
At run-time, it depends on the type of the object being referred to (not the type of the reference variable) that determines which version of an overridden method will be executed.