LogiQuest
Back to Exceptions
1

What is the output of the following program?

public class Main {
    public static void main(String[] args) {
        try {
            int x = 5 / 0;
            System.out.print("A");
        } catch (ArithmeticException e) {
            System.out.print("B");
        } finally {
            System.out.print("C");
        }
    }
}
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.