File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes difference between classes?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "difference between classes??" Watch "difference between classes??" New topic
Author

difference between classes??

ankush walia
Ranch Hand

Joined: Jan 24, 2001
Posts: 95
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!!
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
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.
ryan burgdorfer
Ranch Hand

Joined: Jan 24, 2001
Posts: 219
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

<UL TYPE=SQUARE><I><LI>Ryan Burgdorfer<BR><LI>Java Acolyte</I></UL>
elavazhagan selvaraj
Greenhorn

Joined: Jan 23, 2001
Posts: 5
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


Elavazhagan Selvaraj<BR>elavazhagan@rediffmail.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: difference between classes??