Redefined Method

A Redefined method is a method in a subclass that provides a new definition of an inherited method from a super class in order to provide a more specialized implementation of the subclass.

The Redefined method will have the same name and interface, but will have a new implementation.

Redefined methods cannot be defined as final methods in the super class. Defining a method as final indicates that the method cannot be overridden or redefined.

A constructor method cannot be redefined as it is implicitly a final method.

The method declaration and implementation in the super class is not affected. The redefined method in the subclass “hides” the original method in the super class. All references to an object in the subclass will use the redefined method. The system checks for methods first in the current class and then ‘up the hierarchy’.

Only an inherited public or protected instance method can be redefined. Static Methods cannot be redefined.

Comments