ONAMWAM - Overriding a Non-Abstract Method With an Abstract Method
Checks for the overriding of non-abstract methods by abstract methods in a subclass.
Wrong
void func () {}
}
abstract class Elephant extends Animal {
abstract void func ();
}
Tip: If it is a coincidence of names, rename your method. Otherwise, make this method abstract in an ancestor class or non-abstract in descendant.
Right
void func () {}
}
abstract class Elephant extends Animal {
abstract void extFunc ();
}