Java Basic


  1. Which of these methods can be used to know the type of focus change?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    There are two types of focus events – permanent and temporary. The isTemporary() method indicates if this focus change is temporary, it returns a Boolean value.


  1. Which of these events is generated when the window is closed?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    A WindowEvent is generated when a window is opened, close, activated or deactivated.



  1. Which of these is superclass of ContainerEvent class?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    ContainerEvent is superclass of ContainerEvent, FocusEvent, KeyEvent, MouseEvent and WindowEvent.


  1. Which of the following is advantage of using PreparedStatement in Java?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    PreparedStatement in Java improves performance and also prevents from SQL injection.



  1. FocusEvent is subclass of which of these classes?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    ComponentEvent