Printed number

Report a typo

What number is printed to the console when the window is activated?

public class CheckExitExample extends JFrame {
    private class CheckOnExit extends WindowAdapter {
       public void windowDeactivated(WindowEvent e) {
           System.out.println(7);
       }
 
       public void windowDeiconified(WindowEvent e) {
           System.out.println(10);
       }


        public void windowActivated(WindowEvent e) {
            System.out.println(5);
        }
    }
}
Enter a number
___

Create a free account to access the full topic