import java.io.IOException; class Father { public Father() throws IOException { System.out.print("Father"); throw new IOException(); } } class Son extends Father { public Son() throws IOException { System.out.print("Son"); } } public class Tester { public static void main(String[] args) { try { new Son(); } catch (IOException e) { System.out.print("Inside catch"); } } }
class Father {
public Father() throws IOException {
System.out.print("Father");
throw new IOException();
}
class Son extends Father {
public Son() throws IOException {
System.out.print("Son");
public class Tester {
public static void main(String[] args) {
try {
new Son();
} catch (IOException e) {
System.out.print("Inside catch");
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.