:: 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 (1721)
 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 (146)
 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 25 No
# 2
Adapter class provides an empty implementation of all the
methods in EventListener interface.
Is This Answer Correct ?    180 Yes 40 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
How applets will communicate with each other?   1
Can we override static methods? Bally-Technologies 18
How do you compare two strings? any predefined method for this?   3
what is private constructor?what are the uses of writing private constructor in our program?   10
What are the OOPS concepts in Java ? Satyam 4
What is the purpose of the File class?   3
In Inheritance if we are implementing Multi level inheritance and all class having same name of variable and now i want to access each class variable and how it is possible?   2
if two references are having same hash codes,is that means those are refering to same object? CTS 5
How does marker interface provides functionality to the implemented class ? or How dose maker interface gets the functionalities as serialization or cloning. Cap-Gemini 4
Why Wait and notify are kept in Object class although they are used only with Thread Class Saksoft 2
what is the use of custom tags? with example? Photon 1
What is the default modifier in Interface?   4
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.   ::