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

Give the difference between the println method and sqrt method?

0 Answers  


I am a fresher and know core java, c languge, html, css etc if I am illegible for any job then send it on my email tatranakshay276@gmail.com

0 Answers  


Difference between string s= new string (); and string s = "abv";?

0 Answers   Cap Gemini,


what is the difference between thread and runnable types? : Java thread

0 Answers  


I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?

0 Answers  






what do you mean by stream pipelining in java 8? Explain

0 Answers  


What is finally in exception handling?

7 Answers  


how to connect one jsp page to another jsp page????

6 Answers   IIT, Symphony,


Convert Binary tree to linked list.

0 Answers   Amazon,


Differentiate between array list and vector in java.

0 Answers  


What is the purpose of methodology?

0 Answers  


Does garbage collection guarantee that a program will not run out of memory?

1 Answers  


Categories