File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes anonymous class, please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "anonymous class, please help" Watch "anonymous class, please help" New topic
Author

anonymous class, please help

mpisi
Greenhorn

Joined: Oct 11, 2000
Posts: 3
hello there
i have come across the name "anonymous class".i realy don't understand what kind of class it is ,can some one explain and give me an example.
thanks
desmond mongwe
------------------
mpisi@mailbox.co.za


<A HREF="mailto:mpisi@mailbox.co.za" rel="nofollow">mpisi@mailbox.co.za</A>
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Here comes the Javaranch Cop...
"mpisi", PROPER NAMES ARE NOW REQUIRED!!
Read this post for more details.
Ajith


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Anonymous classes, as the name suggests, are classes which are declared and defined at the point of usage in the program. If you need to 'cook' a class, but would like to use it only once, and if it has very few( usually one or two ) methods in it, then it is probably a good candidate for an anonymous class.
You can read and learn more about them in any good Java book. I would suggest you to pickup a good JavaBook( Thinking In Java by Bruce Eckel is free and popular. The RHE certification guide is another excellent book.
Good luck,
Ajith
mpisi
Greenhorn

Joined: Oct 11, 2000
Posts: 3

hi Ajith Kallambella

thanks for your respond , i understand the concept now,i just have to put it into practice.
message by
desmond


------------------
mpisi@mailbox.co.za
desmond mongwe
Greenhorn

Joined: Oct 11, 2000
Posts: 7
to javaranch cop
i apologise for that name ,i have now changed my user name from mpisi to desmond mongwe
message by
desmond
------------------
mpisi@mailbox.co.za


<A HREF="mailto:mpisi@mailbox.co.za" rel="nofollow">mpisi@mailbox.co.za</A>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: anonymous class, please help