OWS - Overloading Within a Subclass

A superclass method may not be overloaded within a subclass unless all overloadings in the superclass are also overridden in the subclass. It is very unusual for a subclass to be overloading methods in its superclass without also overriding the methods it is overloading. More frequently this happens due to inconsistent changes between the superclass and subclass - i.e. the intention of the user is to override the method in the superclass, but due to the error, the subclass method ends up overloading the superclass method.

Wrong

`public class Elephant extends Animal {
public void oper (char c) {}
public void oper (Object o) {}
}
class Animal {
public void oper (int i) {}
public void oper (Object o) {}
}`

Tip: Overload other methods too.

Right

`public class Elephant extends Animal {
public void oper (char c) {}
public void oper (int i) {}
public void oper (Object o) {}
}
class Animal {
public void oper (int i) {}
}`