Java Basic
- Which of these methods is defined in MouseMotionAdapter class?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The MouseMotionAdapter class defines 2 methods – mouseDragged() and mouseMoved.
- 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.
- Event class is defined in which of these libraries?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
java.util
- What is a listener in context to event handling?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
A listener is a object that is notified when an event occurs. It has two major requirements first, it must have been registered with one or more sources to receive notification about specific event types, and secondly it must implement methods to receive and process these notifications.
- 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.