What is adapter class?

Answer Posted / selvi

Java Language rule are such that we must implement all the
methods of an interface even if we put them into empty
braces.i.e. we must override all the methods declared in
the interface.

But we can create our classes as subclasses of one of
the adapter classes, then we need to override only some of
the methods we need. i.e, An adapter classes provide empty
implementation of all methods declared in an EventListener
interface.

Is This Answer Correct ?    191 Yes 27 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are invisible components?.

1680


What is the purpose of tostring() method in java?

554


Which sorting algorithm is best in java?

537


What do you mean by Hash Map and Hash Table?

604


what is anonymous class in java?

546






Which types of exceptions are caught at compile time?

566


What are java packages?

586


How we can run a jar file through command prompt in java?

521


Discuss different types of errors that generally occur while programming.

581


What is the function of character?

524


What is method overloading in JAVA? Why is it not present in C ?

592


Is java util list serializable?

537


Difference between keyword and identifier.

595


Explain about map interface in java?

595


Why is String immutable?

624