Log In Register

Units


Event Listeners Interfaces - Questions and Answers

 

Practice these Event Listeners Interfaces under Java Programming walk-in interview Questions/ examination questions with best tricks and short cuts with solution. Student (candidate) who want to crack the walk in interview, competitive exams and want to find short cuts and tricks to solve questions on Event Listeners Interfaces for following purpose.


– Anyone who is wishing to increase their perfect knowledge of Event Listeners Interfaces of Java Programming.
– Anyone who is preparing for aptitude test and increase his in depth aptitude knowledge Java Programming specifically Event Listeners Interfaces.
– Anyone who is preparing for interviews (competitive examinations, govt examinations and bank examinations, off-campus or on campus interviews, walk-in interview and company interviews) having questions on Event Listeners Interfaces under Java Programming.

– Anyone who is preparing for aptitude test or competitive exam or entrance exam.
– Anyone who is preparing for entrance examinations and other competitive examinations.
– All Experienced, Freshers and Students.

Here is list of Questions and Answers covering all key area of  Event Listeners Interfaces topic of Java Programming:

 

1. Which of these interfaces define a method itemStateChanged()?

Answer: Option D

Explanation:

2. Which of these methods is defined in MouseMotionAdapter class?

Answer: Option A

Explanation:
The MouseMotionAdapter class defines 2 methods – mouseDragged() and mouseMoved.

3. Which of these interfaces handles the event when a component is added to a container?

Answer: Option B

Explanation:
The ContainerListener defines methods to recognize when a component is added to or removed from a container.

4. Which of these methods will be invoked if a character is entered?

Answer: Option C

Explanation:

5. Which of these are constants defined in WindowEvent class?

Answer: Option D

Explanation:
WindowEvent class defines 7 constants – WINDOW_ACTIVATED, WINDOW_CLOSED, WINDOW_OPENED, WINDOW_DECONIFIED, WINDOW_CLOSING, WINDOW_DEACTIVATED, WINDOW_ICONIFIED.

6.  Which of these interfaces define four methods?

Answer: Option A

Explanation:
ComponentListener defines four methods componentResized(), componentMoved(), componentShown() and componentHidden().

7. Which of these methods will respond when you click any button by mouse?

Answer: Option D

Explanation:
when we click a button, first we enter the region of button hence mouseEntered() method responds then we press the button which leads to respond from mouseClicked() and mousePressed().

8. Which of these packages contains all the event handling interfaces?

Answer: Option C

Explanation:

9. Which of these interfaces define a method actionPerformed()?

Answer: Option C

Explanation:
ActionListener defines the actionPerformed() method that is invoked when an adjustment event occurs.

10. Which of these is superclass of all Adapter classes?

Answer: Option A

Explanation:
All Adapter classes extend Applet class.