About Question enthuware.ocpjp.v7.2.1128 :
Posted: Tue Apr 21, 2015 3:31 pm
Overriding method cannot throw any exceptions that are not thrown by the overridden method.
and your answer is False.
so you mean the overriding method can throw any exceptions that are not thrown by the overridden method.
This code is valid?
class A{
void m1() throws IOException{}
}
class B extends A{
void m1() throws Exception {}
}
Thanks!
and your answer is False.
so you mean the overriding method can throw any exceptions that are not thrown by the overridden method.
This code is valid?
class A{
void m1() throws IOException{}
}
class B extends A{
void m1() throws Exception {}
}
Thanks!