Adapter classes?
Answers were Sorted based on User's Feedback
Answer / ranganathkini
The Java AWT provides a number of adapter classes for the
different EventListener interfaces. These adapter classes
implements the corresponding interfaces with a series of
do-nothing methods.
By subclassing the respective Adapter rather than
implementing EventListener interfaces directly, one can
avoid having to write the methods that are not actually
needed. Only those methods can be overridden that are
planned to be actually implemented.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / a sriniva rao
By using Adapter class we can implement the interface's
required methods.for ex. in an interface there are 100's of
methods,but we want to implement only two methods.By using
Adapter class we can implement those two methods and rest
are defined by null body.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / ravikiran
Adapter classes are the null implementation for the methods
od container class
| Is This Answer Correct ? | 2 Yes | 0 No |
Is main a keyword in java?
What happens when a thread cannot acquire a lock on an object in java programming?
Can we extend singleton class in java?
List out benefits of object oriented programming language?
Can a class have a static inner class?
What is class??
What are the different types of inheritance in java?
How do you create an array in java?
what questions are been asked ??? for interview in apti
How many wrapper classes are there in java?
Difference between error and exception
Is java a utf 8 string?