JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Java interview questions part 9
Java interview questions part 9
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which of these interfaces define four methods?
A. ComponentListener
B. ContainerListener
C. ActionListener
D. InputListener
Show Correct Answer
Correct Answer is :
ComponentListener
2. Which of these interfaces define a method itemStateChanged()?
A. ComponentListener
B. ContainerListener
C. ActionListener
D. ItemListener
Show Correct Answer
Correct Answer is :
ItemListener
3. Which of these methods will respond when you click any button by mouse?
A. mouseClicked()
B. mouseEntered()
C. mousePressed()
D. all of the mentioned
Show Correct Answer
Correct Answer is :
all of the mentioned
4. Which of these methods will be invoked if a character is entered?
A. keyPressed()
B. keyReleased()
C. keyTyped()
D. keyEntered()
Show Correct Answer
Correct Answer is :
keyTyped()
5. Which of these methods is defined in MouseMotionAdapter class?
A. mouseDragged()
B. mousePressed()
C. mouseReleased()
D. mouseClicked()
Show Correct Answer
Correct Answer is :
mouseDragged()
6. Which of these is a superclass of all Adapter classes?
A. Applet
B. ComponentEvent
C. Event
D. InputEvent
Show Correct Answer
Correct Answer is :
Applet
7. Which of these events is generated when the window is closed?
A. TextEvent
B. MouseEvent
C. FocusEvent
D. WindowEvent
Show Correct Answer
Correct Answer is :
WindowEvent
8. Which of these methods can be used to obtain the coordinates of a mouse?
A. getPoint()
B. getCoordinates()
C. getMouseXY()
D. getMouseCordinates()
Show Correct Answer
Correct Answer is :
getPoint()
9. Which of these methods can be used to change location of an event?
A. ChangePoint()
B. TranslatePoint()
C. ChangeCordinates()
D. TranslateCordinates()
Show Correct Answer
Correct Answer is :
TranslatePoint()
10. Which of these are integer constants of TextEvent class?
A. TEXT_CHANGED
B. TEXT_FORMAT_CHANGED
C. TEXT_VALUE_CHANGED
D. TEXT_sIZE_CHANGED
Show Correct Answer
Correct Answer is :
TEXT_VALUE_CHANGED
11. Which of these methods is used to obtain the object that generated a WindowEvent?
A. getMethod()
B. getWindow()
C. getWindowEvent()
D. getWindowObject()
Show Correct Answer
Correct Answer is :
getWindow()
12. MouseEvent is subclass of which of these classes?
A. ComponentEvent
B. ContainerEvent
C. ItemEvent
D. InputEvent
Show Correct Answer
Correct Answer is :
InputEvent
13. Which of these methods is used to get x coordinate of the mouse?
A. getX()
B. getXCoordinate()
C. getCoordinateX()
D. getPointX()
Show Correct Answer
Correct Answer is :
getX()
14. Which of these are constants defined in WindowEvent class?
A. WINDOW_ACTIVATED
B. WINDOW_CLOSED
C. WINDOW_DEICONIFIED
D. All of the mentioned
Show Correct Answer
Correct Answer is :
All of the mentioned
15. Which of these is superclass of WindowEvent class?
A. WindowEvent
B. ComponentEvent
C. ItemEvent
D. InputEvent
Show Correct Answer
Correct Answer is :
ComponentEvent
16. Which of these events is generated when the size of an event is changed?
A. ComponentEvent
B. ContainerEvent
C. FocusEvent
D. InputEvent
Show Correct Answer
Correct Answer is :
ComponentEvent
17. Which of these events is generated when the component is added or removed?
A. ComponentEvent
B. ContainerEvent
C. FocusEvent
D. InputEvent
Show Correct Answer
Correct Answer is :
ContainerEvent
18. Which of these methods can be used to obtain the reference to the container that generated a ContainerEvent?
A. getContainer()
B. getContainerCommand()
C. getActionEvent()
D. getContainerEvent()
Show Correct Answer
Correct Answer is :
getContainerEvent()
19. Which of these methods can be used to get reference to a component that was removed from a container?
A. getComponent()
B. getchild()
C. getContainerComponent()
D. getComponentChild()
Show Correct Answer
Correct Answer is :
getchild()
20. Which of these are integer constants of ComponentEvent class?
A. COMPONENT_HIDDEN
B. COMPONENT_MOVED
C. COMPONENT_RESIZE
D. All of the mentioned
Show Correct Answer
Correct Answer is :
All of the mentioned
Similar Interview Questions
Search for latest jobs
Find Jobs