import java.io.IOException; class AirPlane { public AirPlane() { System.out.print("AirPlane"); } } class AirJet extends AirPlane { public AirJet() throws IOException { try { throw new IOException(); } catch (IOException e) { System.out.print("IOException is thrown in AirJet"); } } } public class Tester { public static void main(String args[]) { try { new AirJet(); } catch (IOException e) { System.out.print("IOException is thrown in Tester"); } } }
class AirPlane {
public AirPlane() {
System.out.print("AirPlane");
}
class AirJet extends AirPlane {
public AirJet() throws IOException {
try {
throw new IOException();
} catch (IOException e) {
System.out.print("IOException is thrown in AirJet");
public class Tester {
public static void main(String args[]) {
new AirJet();
System.out.print("IOException is thrown in Tester");
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.