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

Explain access modifiers in java.

0 Answers  


what is business delegate?

2 Answers   TCS,


What is protected and friendly?

1 Answers  


What is the difference between menuitem and checkboxmenu item?

0 Answers  


What is return type in java?

0 Answers  






Are arrays static in java?

0 Answers  


how copy the hashmap object into arraylist at java program?

4 Answers   HCL, Wipro,


which swing component is similar to rich text box in .net/vb

1 Answers  


How many bytes is 255 characters?

0 Answers  


Differentiate between stringbuffer and string?

0 Answers  


Can a class extend abstract class or interface? why

4 Answers   Wipro,


how tha garbage collector know that the object will be deleted? on which algorithm the garbage collector works? what is the working principle of garbage collector? How manay types of garbage collectors r there?

1 Answers   HP, SparkTG,


Categories