LogiQuest
Back to Exceptions
10

What is the output of the following program?

public class Main {
    public static void main(String[] args) {
        try {
            System.out.print("A");
            throw new RuntimeException();
        } catch (RuntimeException e) {
            System.out.print("B");
        } finally {
            System.out.print("C");
        }
        System.out.println();
    }
}
Easy

Discussion (0)

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

Log in to join the discussion.