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

write a program that list all permutations of ABCDEF in which A appears before B?

1986


Why are constructors used?

538


What is the replace tool?

523


What is a boolean flag in java?

540


How do you implement polymorphism in our day to day life?

2743






What is ‘is-a ‘ relationship in java?

561


Who developed java?

540


What is a module function?

535


What is void data type?

556


How does arraylist work in java?

506


Does set allows null in java?

489


What is the difference between abstract classes and interfaces?

487


When does an object becomes eligible for garbage collection in java?

553


What is an object's lock and which object's have locks in java programming?

540


How transient variable is different from volatile variable?

535