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 to perform merge sort in java?

0 Answers  


Does unicode support all languages?

0 Answers  


Can final class have constructor?

0 Answers  


What is an 8 bit word?

0 Answers  


How can we use primitive data types as objects?

0 Answers  






What is Three tier architecture. Can anyone explain with a Ordinary web application Project? (JSP,Servlets,JAVA,DAO) ?

3 Answers   TCS,


Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.

0 Answers  


what is an objects lock and which objects have locks? : Java thread

0 Answers  


List some features of the abstract class.

0 Answers  


Explain the scope of a variable.

0 Answers   TCS,


What are design patterns and please explain?

0 Answers  


What do you mean by data type?

0 Answers  


Categories