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 Inner class doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Inner class doubt" Watch "Inner class doubt" New topic
Author

Inner class doubt

Surekha Reddy
Greenhorn

Joined: Nov 11, 2005
Posts: 20
Hi All,

I have a doubt regarding Inner class..

Can we call a local class in a static block as an inner class??

As far as i know member classes, local classes and anonymous classes which are non-static are called inner classes. Correct me if i'm wrong.


Reagrds,
Surekha.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Sorry, when you say "can we call a local class" does that mean "can my program instantiate an instance of a local class" or "can people use the name X when talking about a local class"?
Surekha Reddy
Greenhorn

Joined: Nov 11, 2005
Posts: 20
Hi,

Which of the following are true?

1) A static member class is also called as an inner class.
2) A non-static member class is also called as an inner class.
3) A local class in a static block is also called as inner class.
4) A local class in a non-static block is also called as inner class.

Hope my question is clear now.

Thanks in advance!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Inner class doubt