|
|
|
| javaprepare.com
your tool for Java Certification |
home | tutorial | questions | test 1
Questions on Events
This topic is part of SCJP 1.2 exam but not SCJP 1.4 exam.
-
Name the method defined in EventObject class that returns the Object generated from the event. Select the one correct answer.
- getEvent()
- getObject()
- getID()
- getSource()
-
What is the return type of the method getID() defined in AWTEvent class. Select the one correct answer.
- int
- long
- Object
- Component
- short
-
Name the event that gets generated when a button is clicked. Select the one correct answer.
- KeyEvent
- MouseEvent
- ItemEvent
- ActionEvent
-
Which event is generated when the position of a scrollbar is changed. Select the one correct answer.
- KeyEvent
- MouseEvent
- ItemEvent
- ActionEvent
- AdjustmentEvent
-
Which of the following Objects can generate ActionEvent. Select the one correct answer.
- List
- TextArea
- CheckboxMenuItem
- Choice
-
Which of the following Objects can generate ItemEvent. Select the two correct answer.
- CheckBox
- Button
- List
- MenuItem
-
Which method identifies the type of an event generated. Select the one correct answer.
- getSource()
- getType()
- getEventType()
- getID()
- Which of the following are legal adapter classes in Java. Select the two correct answers.
- ActionAdapter
- ItemAdapter
- TextAdapter
- MouseAdapter
- MouseMotionAdapter
-
Name the class of the argument of method actionPerformed() defined in the ActionListener interface.
-
Which of these listener classes have corresponding adapter classes. Select the two correct answers.
- ContainerListener
- TextListener
- ItemListener
- MouseMotionListener
-
Which of these are valid adapter classes. Select the one correct answer.
- ActionAdapter
- AdjustmentAdapter
- KeyAdapter
- TextAdapter
-
Which of these methods are defined in MouseMotionlistener interface. Select the two correct answers.
- mouseClicked()
- mousePressed()
- mouseEntered()
- mouseDragged()
- mouseMoved()
-
What is the return type of the method getSource() defined in EventObject class. Select the one correct answer.
- int
- long
- Object
- Component
- short
Answers to questions on Events
- d
- a
- d
- e
- a
- a, c
- d
- d, e
- ActionEvent
- a, d
- c
- d, e
- c
home | tutorial | questions | test 1
|