Results 1 to 3 of 3

Thread: What is Adapterclass

  1. #1
    Expert Member
    Join Date
    Oct 2006
    Answers
    209

    What is Adapterclass

    What is Adapterclass? when do we use it?Please give me the answers.

    NOTE : [This question was asked by Srivani]


  2. #2
    Contributing Member
    Join Date
    Jun 2006
    Answers
    95

    Re: What is Adapterclass

    An adapter is one of the classic design patterns. It is also a class in Java that implements an interface with a set of dummy methods. You can then subclass the adapter class and override just the methods you need. If you implemented the interface directly, you would have to write all the dummy methods yourself. Most commonly an adapter is used to help you rapidly construct your own Listener class to field events. My extending an adapter class, with KeyAdapter, FocusAdapter, WindowAdapter etc. you don't have to write methods for events you are not interested in handling.


  3. #3
    Junior Member
    Join Date
    Jan 2007
    Answers
    2

    Re: What is Adapterclass

    An adapter class provides an empty implementation of all the methods in an event listener.U can define a new class to act as an event listener by extending one of the adapter classes an implementing only those events in which u r interested

    Last edited by Ankita Modi; 01-09-2007 at 03:19 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact