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

What is a default constraint?

0 Answers   HCL,


why java does not support multiple inheritance

41 Answers   Diamond, Euclid, Evergent, KLKJ, Mind Tree, NIIT, SSI Small Scale Industries, Wipro,


Package1 and Package2 both have a method name lets say "methodA" with different implementation. When I import both the packages in a java class how can I use both the methods?

7 Answers   Ericsson,


How many bits are in a sentence?

0 Answers  


Which is the best sorting technique in java?

0 Answers  


What is the static method?

0 Answers  


What is multiple inheritance? Is it supported by java?

0 Answers  


What is constructor chaining in java?

0 Answers  


Explain different types of wrapper classes in java?

0 Answers  


what are the methods of an object class?

3 Answers  


What do you mean by inner class in java? Explain

0 Answers  


Why you should not use singleton?

0 Answers  


Categories