FAQ
  Java Tutorial
  Questions by Topic
  Sample test
  Other Certification sites
  Certification Tips
  Exam Objectives
  Java jobs
  Java News
  About Java Prepare
   Books
  Certification Books
  SCEA Books
  Online Books
   Tutorial Topics
  Language Fundamentals
  Operator and Assignments
  Declaration and Access Control
  Classes in Java
  AWT
  Event classes
  Threads
  Layout Managers
  Collections
  Files
   Advertisements

Shop here!


   Feedback
  Please let us know your feedback
 
Be Punjabi...Speak Punjabi
javaprepare.com
your tool for Java Certification
home | tutorial | questions | test 1

Questions on Events

  1. Name the method defined in EventObject class that returns the Object generated from the event. Select the one correct answer.
    1. getEvent()
    2. getObject()
    3. getID()
    4. getSource()
  2. What is the return type of the method getID() defined in AWTEvent class. Select the one correct answer.
    1. int
    2. long
    3. Object
    4. Component
    5. short
  3. Name the event that gets generated when a button is clicked. Select the one correct answer.
    1. KeyEvent
    2. MouseEvent
    3. ItemEvent
    4. ActionEvent
  4. Which event is generated when the position of a scrollbar is changed. Select the one correct answer.
    1. KeyEvent
    2. MouseEvent
    3. ItemEvent
    4. ActionEvent
    5. AdjustmentEvent
  5. Which of the following Objects can generate ActionEvent. Select all correct answer.
    1. List
    2. TextArea
    3. CheckboxMenuItem
    4. Choice
  6. Which of the following Objects can generate ItemEvent. Select all correct answer.
    1. CheckBox
    2. Button
    3. List
    4. MenuItem
  7. Which method identifies the type of an event generated. Select the one correct answer.
    1. getSource()
    2. getType()
    3. getEventType()
    4. getID()
  8. Which of the following are legal adapter classes in Java. Select all correct answers.
    1. ActionAdapter
    2. ItemAdapter
    3. TextAdapter
    4. MouseAdapter
    5. MouseMotionAdapter
  9. Name the class of the argument of method actionPerformed() defined in the ActionListener interface.
  10. Which of these listener classes have corresponding adapter classes. Select all correct answers.
    1. ContainerListener
    2. TextListener
    3. ItemListener
    4. MouseMotionListener
  11. Which of these are valid adapter classes. Select all correct answers.
    1. ActionAdapter
    2. AdjustmentAdapter
    3. KeyAdapter
    4. TextAdapter
  12. Which of these methods are defined in MouseMotionlistener interface. Select all correct answers.
    1. mouseClicked()
    2. mousePressed()
    3. mouseEntered()
    4. mouseDragged()
    5. mouseMoved()
  13. What is the return type of the method getSource() defined in EventObject class. Select the one correct answer.
    1. int
    2. long
    3. Object
    4. Component
    5. short
Answers to questions on Events
  1. d
  2. a
  3. d
  4. e
  5. a
  6. a, c
  7. d
  8. d, e
  9. ActionEvent
  10. a, d
  11. c
  12. d, e
  13. c
I Langoo You Langoo
home | tutorial | questions | test 1