«^»
7.5. Method overriding

You can give a method of a subclass the same name as a method of the superclass. This often occurs when more appropriate code can be devised for the method of the subclass. This is called method overriding. Note: you cannot override a method that has the modifier final (or static or private) in the superclass.

There are two examples of this with the Person and Student classes: the methods equals and toString appear in both the superclass Person and the subclass Student.

Method overriding should not be confused with method overloading which was introduced earlier.