File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Is this correct? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Is this correct?" Watch "Is this correct?" New topic

Is this correct?

Yuan Ye
Ranch Hand

Joined: Mar 05, 2003
Posts: 172
An instance of an Anonymous inner class can only be created in it's outer class.
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
An anonymous class can also be defined as an argument to a method or somewhere inside the method.

SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Brian Joseph
Ranch Hand

Joined: May 16, 2003
Posts: 160
The question is confusing. When the question reads "in the outer class", is this just referring to "class scope", meaning within the class definition but outside of any method definition blocks?
I agree. Here's the link:
subject: Is this correct?
Similar Threads
can non-static inner class access any member
andrew has wii
Doubt about diagram class
Doubt about diagram class (realization)
WA #1.....word association