adapter class ?

Answers were Sorted based on User's Feedback



adapter class ?..

Answer / janet

An adapter class provides an empty implementation of all
methods in an event listener interface.Adapter classes are
useful when you want to receive and process only some of
the events that are handled by a particular event listener
interface.you can define a new class to act lisener by
extending one of the adapter classes and implementing onlu
those events in which you are interested.
For ex: the MouseMotionListenerAdapter class has two
methods,mouseDragged() and mouseMoved(). The signatures of
these empty are exactly as defined in the
MouseMotionListener interface. If you are interested in
onlu mouse drag events,that you could simply extend
MouseMotionAdapter and implement mouseDragged().

Is This Answer Correct ?    3 Yes 0 No

adapter class ?..

Answer / ravikiran(aptech mumbai)

adapter class provides empty implementation for
eventlistener interface

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

How can an exception be thrown manually by a programmer?

1 Answers  


How to calculate the length of a singly linked list in java?

1 Answers  


What is thread?

7 Answers   BMC, Virtusa,


How many functional interfaces does java 8 have?

1 Answers  


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

1 Answers  


How big is a pointer?

1 Answers  


Explain the difference between static and dynamic binding in java?

1 Answers  


Write a program for recursive Traverse?

1 Answers  


What is difference between word and integer?

1 Answers  


How many bits is a boolean?

1 Answers  


What are desktop procedures?

1 Answers  


What are the 4 types of research methods?

1 Answers  


Categories