This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes anonymous class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "anonymous class?" Watch "anonymous class?" New topic

anonymous class?

Aaron Raja
Ranch Hand

Joined: Jun 07, 2007
Posts: 206
It is said: Classes defined in methods can be anonymous, in which case they must be instantiated at the same point they are defined. These classes can�t have explicit constructor and may implement interface or extend other classes.
Can you give me simple example please?

Thanks, AR
marc weber

Joined: Aug 31, 2004
Posts: 11343

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
I agree. Here's the link:
subject: anonymous class?
Similar Threads
argument defined anonymous classes
Method References
Anonymous Inner Class
Anonymous Class
Anonymous class....