aspose file tools*
The moose likes Beginning Java and the fly likes anonymous 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 "anonymous classes" Watch "anonymous classes" New topic
Author

anonymous classes

rachana ravali
Ranch Hand

Joined: Jun 20, 2006
Posts: 32
can an anonymous class extend a class or implement an interface?
please explain to me.
i am new to java.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
Welcome to the Ranch.

The short answer to both your questions is yes. In fact if it doesn't do one or the other, you have to give it a name, and it ceases to be anonymous.

You will find this is discussed many a time on the Ranch; different people have different opinions. Look at this thread in the advanced forum, for example.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: anonymous classes