Answer given:A,D for D, in MyMethod() in MyExp2 class, Unchecked exception can be throw, even in method declare, it can throws Unchecked exception. I think if D says: MyMethod() cannot declare IOException exception in MyExp2 class , then it would be correct.
posted 15 years ago
I agree with you here. Java insists that an overriding method can not throw a checked exception not thrown by the method it is overriding. It can however throw runtime exceptions.