Menu
Question Index
...

public class Exception4 {
    void m() {
    }
    void n()  {
        m();
    }
    void p() {
        try {
            n();
        } catch (Exception e) {
            System.out.println("exception handled");
        }
    }
    public static void main(String args[]) {
        Exception4 obj = new Exception4();
        obj.p();
        System.out.println("normal flow");
    }
}


exception handled
normal flow
normal flow
Some other output
Compilation Error or Runtime Error

Doubts

Problems

Topic: Exception Handling In Java with Example Program

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App