LogiQuest
Back to Objects and Classes
5

What is the output of the following program?

class Main {
    Main() { this(5); System.out.print("A"); }
    Main(int x) { System.out.print("B"); }
    public static void main(String[] args) { new Main(); }
}
Medium

Discussion (0)

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

Log in to join the discussion.