Object-oriented programming in Java.
A method is sometimes inherited by a subclass from superclass which is not according the requirements. Perhaps, twenty methods are inherited by subclass & one among them is not right.
Subclass in such case will be overriding those methods, by method redefinition.
Method that is defined in superclass is not affected by this override.
In following example, Cat class is the subclass & superclass includes Animal. Eat() method that has been inherited by the Animal