Adapter classes?

Answers were Sorted based on User's Feedback



Adapter classes?..

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

Adapter classes?..

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

Adapter classes?..

Answer / ravikiran

Adapter classes are the null implementation for the methods
od container class

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is thread synchronization in java?

0 Answers  


Can we declare a constructor as final?

0 Answers  


What is a module function?

0 Answers  


they asked class A{} class B{} class c{} all the three class saved as a single file,there is no main method in the file and anothe class M.java class m { psvm(String args[]) { // here the parent class can access } }

2 Answers   DNS, IPSR Solutions,


Explain about data types?

0 Answers  






What is an Applet ?

2 Answers  


How does sublist works in java?

0 Answers  


Difference between association, composition and aggregation?

0 Answers  


What is an abstract method in java programming?

0 Answers  


In what types of operations an ArithmeticException will be thrown?

3 Answers  


Can we override a variable in java?

0 Answers  


What is string pooling concept?

0 Answers  


Categories