public class OverrideThrowsTest {
public static void main(String[] args)
// 1
{
A a = new A();
a.method();
A ab = new B();
ab.method();
B b = new B();
b.method();
}
}
class A {
public void method() throws IOException {}
}
class B extends A {
public void method() throws FileNotFoundException {}
}
Select all the answers, for which, if placed into line 1, code will compile.
Login in to like
Login in to comment