JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Java interview questions part 10
Java interview questions part 10
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which of these events is generated when computer gains or loses input focus?
A. ComponentEvent
B. ContainerEvent
C. FocusEvent
D. InputEvent
Show Correct Answer
Correct Answer is :
FocusEvent
2. FocusEvent is subclass of which of these classes?
A. ComponentEvent
B. ContainerEvent
C. ItemEvent
D. InputEvent
Show Correct Answer
Correct Answer is :
ComponentEvent
3. Which of these methods can be used to know the type of focus change?
A. typeFocus()
B. typeEventFocus()
C. isTemporary()
D. isPermanent()
Show Correct Answer
Correct Answer is :
isTemporary()
4. Which of these is superclass of ContainerEvent class?
A. WindowEvent
B. ComponentEvent
C. ItemEvent
D. InputEvent
Show Correct Answer
Correct Answer is :
ComponentEvent
5. Which of these events is generated when a button is pressed?
A. ActionEvent
B. KeyEvent
C. WindowEvent
D. AdjustmentEvent
Show Correct Answer
Correct Answer is :
ActionEvent
6. Which of these methods can be used to obtain the command name for invoking ActionEvent object?
A. getCommand()
B. getActionCommand()
C. getActionEvent()
D. getActionEventCommand()
Show Correct Answer
Correct Answer is :
getActionCommand()
7. Which of these are integer constants defined in ActionEvent class?
A. ALT_MASK
B. CTRL_MASK
C. SHIFT_MASK
D. All of the mentioned
Show Correct Answer
Correct Answer is :
All of the mentioned
8. Which of these methods can be used to know which key is pressed?
A. getKey()
B. getModifier()
C. getActionKey()
D. getActionEvent()
Show Correct Answer
Correct Answer is :
getModifier()
9. Which of these events is generated by scroll bar?
A. ActionEvent
B. KeyEvent
C. WindowEvent
D. AdjustmentEvent
Show Correct Answer
Correct Answer is :
AdjustmentEvent
10. Which of these methods can be used to determine the type of adjustment event?
A. getType()
B. getEventType()
C. getAdjustmentType()
D. getEventObjectType()
Show Correct Answer
Correct Answer is :
getAdjustmentType()
11. Which of these methods can be used to know the degree of adjustment made by the user?
A. getValue()
B. getAdjustmentType()
C. getAdjustmentValue()
D. getAdjustmentAmount()
Show Correct Answer
Correct Answer is :
getValue()
12. Which of these constant value will change when the button at the end of scroll bar was clicked to increase its value?
A. BLOCK_DECREMENT
B. BLOCK_INCREMENT
C. UNIT_DECREMENT
D. UNIT_INCREMENT
Show Correct Answer
Correct Answer is :
UNIT_INCREMENT
13. Which of these packages contains all the classes and methods required for even handling in Java?
A. java.applet
B. java.awt
C. java.event
D. java.awt.event
Show Correct Answer
Correct Answer is :
java.awt.event
14. What is an event in delegation event model used by Java programming language?
A. An event is an object that describes a state change in a source
B. An event is an object that describes a state change in processing
C. An event is an object that describes any change by the user and system
D. An event is a class used for defining object, to create events
Show Correct Answer
Correct Answer is :
An event is an object that describes a state change in a source
15. Which of these methods are used to register a keyboard event listener?
A. KeyListener()
B. addKistener()
C. addKeyListener()
D. eventKeyboardListener()
Show Correct Answer
Correct Answer is :
addKeyListener()
16. Which of these methods are used to register a mouse motion listener?
A. addMouse()
B. addMouseListener()
C. addMouseMotionListner()
D. eventMouseMotionListener()
Show Correct Answer
Correct Answer is :
addMouseMotionListner()
17. What is a listener in context to event handling?
A. A listener is a variable that is notified when an event occurs
B. A listener is a object that is notified when an event occurs
C. A listener is a method that is notified when an event occurs
D. None of the mentioned
Show Correct Answer
Correct Answer is :
A listener is a object that is notified when an event occurs
18. Event class is defined in which of these libraries?
A. java.io
B. java.lang
C. java.net
D. java.util
Show Correct Answer
Correct Answer is :
java.util
19. Which of these methods can be used to determine the type of event?
A. getID()
B. getSource()
C. getEvent()
D. getEventObject()
Show Correct Answer
Correct Answer is :
getID()
20. Which of these class is super class of all the events?
A. EventObject
B. EventClass
C. ActionEvent
D. ItemEvent
Show Correct Answer
Correct Answer is :
EventObject
Similar Interview Questions
Search for latest jobs
Find Jobs