ALLInterview.com :: 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                      
tip   SiteMap shows list of All Categories in this site.
Google
   
 
Categories  >>  Software  >>  Java Related  >>  Java J2EE  >>  Core Java
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
What is adapter class?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is adapter class?
Answer
# 1
Adapter class provides an empty implementation of all the
methods in EventListener interface.
 
Is This Answer Correct ?    179 Yes 39 No
Niranjanravi
 
  Re: What is adapter class?
Answer
# 2
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
interface.
 
Is This Answer Correct ?    184 Yes 25 No
Selvi
 
 
 
  Re: What is adapter class?
Answer
# 3
it is a class,we can creat our classes as sun classes one of
the adapter class.
 
Is This Answer Correct ?    16 Yes 56 No
Shailendra
 
  Re: What is adapter class?
Answer
# 4
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
Khan
 
  Re: What is adapter class?
Answer
# 5
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 class.you can use either one or all method.
 
Is This Answer Correct ?    27 Yes 6 No
Pratik Vegad
 
  Re: What is adapter class?
Answer
# 6
adapter class are simply the creation of event handler in
certain situation
 
Is This Answer Correct ?    12 Yes 9 No
Hardeep
 
  Re: What is adapter class?
Answer
# 7
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
Akki
 
  Re: What is adapter class?
Answer
# 8
A class which having a methods and those are having dummy
implementation (no implementation).
 
Is This Answer Correct ?    12 Yes 2 No
Vykuntarao
 
  Re: What is adapter class?
Answer
# 9
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
Barkha
 
  Re: What is adapter class?
Answer
# 10
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
interface.
 
Is This Answer Correct ?    2 Yes 0 No
Senthil
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Why cant we define System.out.println() inside a class directly?  5
How to access a variable if it is declared as private?  3
I have an HashMap object, which has with key and value pair. It has 10 keys and values in that object. Now the question is I want insert new key and value in middle or any where in that list but not at the end or at the top. Is it possible or not. If yes how can we achieve this one? Huawei2
what are depricated methods in threads and explain the lifecycle methods  5
What is the use of an interface?  3
84. try { 85. ResourceConnection con = resourceFactory.getConnection(); 86. Results r = con.query(”GET INFO FROM CUSTOMER”); 87. info = r.getData(); 88. con.close(); 89. } catch (ResourceException re) { 90. errorLog.write(re.getMessage()); 91. } 92. return info; Which is true if a ResourceException is thrown on line 86? 1 Line 92 will not execute. 2 The connection will not be retrieved in line 85. 3 The resource connection will not be closed on line 88. 4 The enclosing method will throw an exception to its caller.  1
Linked List reverese program Bally-Technologies2
relation between list and linked list Infosys1
I have 100 records in a table with two rows. I need to display 10 records per page like Google Search. I need only the Logic(Pagination) in Pure Java. No JSP and all..Thanks in Advance... Cybernet2
is java support call by reference and call by value, if supports please explain?  5
Suppose there is an array list [10,5,20,19,15,24].Print them in ascending & descending order in collection framework concept ??? Cognizent2
Define interface?  3
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com