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!!
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.
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