Java / Inheritance
What are the rules of method overriding in Java?
private, final and static methods cannot be overridden.
The overriding method must have same argument list.
The overriding method must have same return type or covariant return type.
The overriding method cannot reduce the method visibility.
The overriding method must not throw new or broader checked exceptions.
Overriding method can increase access of overridden method.
Use the super keyword to invoke the overridden method from a subclass.
Constructors cannot be overridden.
The synchronized and the strictfp modifier has no effect on the rules of overriding.
More Related questions...