Java Basic
- Event class is defined in which of these libraries?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
java.util
- Which of these methods can be used to determine the type of event?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
getID() can be used to determine the type of an event.
- Which of these class is super class of all the events?
-
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.
- Which of these methods can be used to know which key is pressed?
-
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.
- Which of these are integer constants defined in ActionEvent class?
-
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