:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Java Related >> Java J2EE >> Core Java


 Core Java interview questions  Core Java Interview Questions (1722)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (44)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (196)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (147)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
What is adapter class?
 Question Submitted By :: Core-Java
I also faced this Question!!     Answer Posted By  
# 1
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
Is This Answer Correct ?    187 Yes 26 No
# 2
Adapter class provides an empty implementation of all the
methods in EventListener interface.
Is This Answer Correct ?    180 Yes 41 No
# 3
In java programming language, adapter class is used to
implement an interface having a set of dummy methods. The
developer can then further subclass the adapter class so
that he can override to the methods he requires.
Implementing an interface directly, requires to write all
the dummy methods. In general an adapter class is used to
rapidly construct your own Listener class to field events.
Is This Answer Correct ?    54 Yes 8 No
# 4
in a java programming language if you have a not all method
use but only selected method used at that time you can use
adapter can use either one or all method.
Is This Answer Correct ?    27 Yes 6 No
Pratik Vegad
# 5
Adapter classes are empty implementation of the methods provided by their corresponding interfaces.
if we implements the interface we have to give definition to all methods of interface.
but if we extend adapter class then we will require to define method which we gonna use in our code
Is This Answer Correct ?    19 Yes 5 No
# 6
A class which having a methods and those are having dummy
implementation (no implementation).
Is This Answer Correct ?    12 Yes 2 No
# 7
An adapter class is a class that provides a dummy (empty)
implementation for an interface. That way someone who wants
to implement the interface but does not want or does not
know how to implement all methods, can use the adapter class
instead, and only override the methods he is interested in.
Is This Answer Correct ?    7 Yes 0 No
# 8
adapter class are simply the creation of event handler in
certain situation
Is This Answer Correct ?    12 Yes 9 No
# 9
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
Is This Answer Correct ?    2 Yes 0 No
# 10
An adapter class is an implementation class of listener interface which contain all methods implemented with empty body.For e.g WindowAdapter is an adapter of WindowListener interface. Adapter class reduce overhead on programming while working with listener interface. 
Is This Answer Correct ?    2 Yes 0 No
Rajat Patel

Other Core Java Interview Questions
  Question Asked @ Answers
What are listeners in java and explain ? TCS 2
Name the packages in JDK?   2
what are the analysis of an object   2
Program to print 1 1 2 1 2 3 1 2 3 4 like that Huawei 8
hi to all. well can you please tell me that why String class is immutable? Thanks in advance. Huawei 5
What are batch updates. in jdbc Corent-Technology 2
what is the difference between object and class IBM 10
is it mandatory to deaclare all variables public static fianl in interfaces?if i declare like in the below program, public interface A { public static final int I=0; int j=0; } in interface A,what is the difference between I,j?   2
What are the override methods in Object class? Tech-Mahindra 2
What is the range of the char type?   3
explain the concept of inheritance with an example? Polaris 7
Class A extends Class B but Class A also inherit Super Class Object so it is multiple inheritence give reason in support of your answer   3
For more Core Java Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::