1. What is an event in Java? A. An action or occurrence to which a program can respond B. A Java class that handles exceptions C. A type of exception D. A data type Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
2. In Java event handling, what is an event source? A. An event listener B. A keyword used to declare events C. A method that handles events D. An object that generates events Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
3. Which package in Java contains classes for event handling? A. `java.util` B. `java.swing` C. `java.awt.event` D. `java.io` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
4. What is an event listener in Java? A. A Java class that generates events B. An object that listens for events and responds to them C. A method that handles events D. None of These Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
5. In Java, which method is used to register an event listener with an event source? A. `addEventListener()` B. `addEventSource()` C. `addActionListener()` D. `addEventHandler()` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
6. What is the purpose of the `ActionEvent` class in Java event handling? A. It represents an exception B. It represents a listener interface C. It represents an event source D. It represents an action event generated by a component like a button Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
7. In Java event handling, what is the purpose of the `getSource()` method of the `ActionEvent` class? A. It returns the object that generated the event B. It returns the event listener object C. It returns the event source D. It returns the event type Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
8. Which event listener interface is used for handling action events in Java? A. `ActionHandler` B. `EventHandler` C. `EventListener` D. `ActionListener` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
9. In Java, how do you specify that an event should trigger a particular method for event handling? A. By using a keyword in the event source declaration B. By adding a random method to the event source C. By implementing an event listener interface and overriding its method D. By using the `performEvent()` method Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
10. What is the purpose of the `ItemEvent` class in Java event handling? A. It represents an event source B. It represents an item event generated by components like checkboxes and radio buttons C. It represents an event listener D. None of These Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board