• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

difference between classes??

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI EVERYONE;
CAN ANYONE TELL ME WHAT IS THE DIFFERENCE BETWEEN
"ADAPTER CLASS" AND "ANONYMOUS CLASS"
AND ALSO IF THERE IS ANY DIFFERENCE BETWEEN THE TWO BASED ON THEIR RUNTIME AND COMPILE TIME CHARACTERISITICS??
ankush!!
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ankush,
An Anonymous class is any class you create that doesn't have a name and therefore cannot contain constructors.
An Adapter class is a class that Java provides that implements a certain AWT event listener. An Adapter class is present for any event listener interface that requires more than 1 method to be implemented. The class provides empty methods so that when you extend them you don't need to type as much!
The major difference is that they are two different concepts in Java...
Regards,
Manfred.
 
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ankush,
Perhaps you thought they were somoehow related because they are both commonly nested. Check out this article here at the ranch: http://javaranch.com/campfire/StoryInner.jsp
~Ryan
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
Anonymous class is the inner class which doesn't have the name.
Adapter class is the class which is provided by java api for awt
implementaion. This is very useful in awt classes in which by using the adapter class there is no need to implement all the methods in the awt classes & interfaces.
visit.........http:\\www.javaworld.com
regards,
elavazhagan
elavazhagan
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic