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 different types of encoding?

814


Why do we need data serialization?

723


What are synchronized blocks in java?

784


Why is it called buffering?

810


Explain about instanceof operator in java?

793


Describe the various concepts related to object oriented programming (oop).

788


What is the size of an array?

753


Explain reverse a linked list recursive java solution?

738


What is an array length?

679


Does string isempty check for null?

757


Explain about anonymous inner classes ?

790


Why are global variables used?

697


What do you mean by aggregation?

797


How many types of string data types are there?

742


What is string example?

793