Method may throw only checked exception types that are the same as, or subclasses of, exception types thrown by the original method for overridden method. : overridden method « Object Oriented « SCJP
6.4.13.Method may throw only checked exception types that are the same as, or subclasses of, exception types thrown by the original method for overridden method.
import java.io.IOException;
class MyClass {
public final void calc(int i, int ti) throws IOException {
}
}
class MySubclass extends MyClass { void calc(int i, int ti) throws Exception {
}
}
Cannot reduce the visibility of the inherited method from MyClass
Method may throw only checked exception types that are the same as, or subclasses of, exception types thrown by the original method for overridden method.