Java Basic


  1. Which of these events is generated by scroll bar?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    WindowEvent


  1. Which of these methods can be used to know which key is pressed?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The getModifiers() methods returns a value that indicates which modifiers keys (ALT, CTRL, META, SHIFT) were pressed when the event was generated.



  1. Which of these are integer constants defined in ActionEvent class?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Action event defines 4 integer constants ALT_MASK, CTRL_MASK, SHIFT_MASK and ACTION_PERFORMED


  1. Which of these methods can be used to obtain the command name for invoking ActionEvent object?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    getActionCommand()



  1. Which of these events is generated when a button is pressed?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Action event is generated when a button is pressed, a list item is double-clicked or a menu item is selected.