what is adapter class? explain uss of adapter in java with an example ?
Answers
Answered by
1
An adapter class provides the default implementation of all methods in an event listener interface. Adapter classes are very useful when you want to process only few of the events that are handled by a particular event listener interface. You can define a new class by extending one of the adapter classes and implement only those events relevant to you.
If a class extends an Adapter Class, we can override some methods which is needed; It can simplify the creation of the Event handlers in certain situations; It provides an empty implementation of all methods in an EventListener Methods
Similar questions