Java Basic


  1. Event class is defined in which of these libraries?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    java.util


  1. Which of these methods can be used to determine the type of event?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    getID() can be used to determine the type of an event.



  1. Which of these class is super class of all the events?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    EventObject class is a super class of all the events and is defined in java.util package.


  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