Title: Key Concept - Overriding and Hiding Methods
Course: CPS 189: Java Certification - Review, Practice & Prepare (Development) > Section: Learning Modules

If an instance method in a subclass has the same signature as an instance method in its superclass, it overrides the superclass method.  Only the instance method in the subclass is available to be called.

The access specifier for an overriding method can allow more, but not less, access than the overridden method.  For example, a protected instance method in the superclass can be made public, but not private, in the subclass.

If a static method in a subclass has the same signature as a static method in its superclass, it hides the superclass method.  Both static methods are available in the subclass.  To call the superclass method, its name must precede the method call.