Java Basic


  1. Which of these are constants defined in WindowEvent class?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    WindowEvent class defines 7 constants – WINDOW_ACTIVATED, WINDOW_CLOSED, WINDOW_OPENED, WINDOW_DECONIFIED, WINDOW_CLOSING, WINDOW_DEACTIVATED, WINDOW_ICONIFIED.


  1. Which of these interfaces define a method itemStateChanged()?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    ItemListener



  1. Which of these interfaces define four methods?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    ComponentListener defines four methods componentResized(), componentMoved(), componentShown() and componentHidden().


  1. Which of these interfaces define a method actionPerformed()?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    ActionListener defines the actionPerformed() method that is invoked when an adjustment event occurs.



  1. Which of these methods will respond when you click any button by mouse?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    when we click a button, first we enter the region of button hence mouseEntered() method responds then we press the button which leads to respond from mouseClicked() and mousePressed().