This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes anonymous inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "anonymous inner class" Watch "anonymous inner class" New topic
Author

anonymous inner class

pooja jain
greenhorn
Ranch Hand

Joined: Jan 12, 2005
Posts: 213
It is mention in Kathy & Bert book on 467 page . you can even have class within an argument of method that are anonymous inner class . but my doubt is they are not in method argument .


:d
Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
What do you mean? Somewhat like this satisfies your statement:

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
new Base() { int i = 8 ; } ;

Pooja , You can consider this line like , this line is giving an reference of an anonymous class & that anonymous calss is a sub class of this Base class & implementation of that anonymous class is b/w the curly braces ...

So now you can have this statement any place where ever reference is required , in method argument, at the time of assigning to another reference ...

I hope it is right & clear to you ...
[ January 14, 2005: Message edited by: rathi ji ]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: anonymous inner class
 
jQuery in Action, 3rd edition