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 |
how we can make a write-only class in java?
In java, how we can disallow serialization of variables?
What is a variable analysis?
What is a Null object?
What is the function of character?
What is binary tree in java?
Does java allow overriding static methods ?
Explain restrictions for using anonymous inner classes?
In which JDK version event-delegation model is introduced?
What is the finalize method do?
What is the benefit of abstract class?
What is a treemap in java?