Overriding Methods
When overriding methods the overriding method must not throw checked exceptions that are new or broader than the those declared by the overridden method.
The overriding method can however throw any unchecked exception (i.e. RuntimeException) regardless of whether the overridden method declares the exception.
The access level can be less restrictive than that of the overridden method.
The access level cannot be more restrictive than that of the overridden method.
The overriding method can throw “narrower” or fewer exceptions. The subclass method may not take the same risks, so it need not declare them all.
Watch Out!
class Animal {
public void eat() throws Exception {
System.out.println("Om Nom … Continue Reading