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 Nested class 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 "Nested class" Watch "Nested class" New topic
Author

Nested class

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1531
Silly but please bear with me... just read "top-level nested class" can be marked staitc. Which one is TOP LEVEL NESTED CLASS here?


outer or inner1? And do the terms
"nested class" and "inner class" mean same??
[ October 05, 2005: Message edited by: Akhil Trivedi ]

Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Hi,

If am not wrong...

outer is top level class...

inner1 is top-level nested class

Sravan Kumar
Ranch Hand

Joined: Sep 11, 2005
Posts: 121
inner1 is top-level nested class, if marked static. In the example portrayed by you, it is a regular inner class.

Refer below:



keep smilin :: sravan<br /><a href="http://sravanpens.blogspot.com" target="_blank" rel="nofollow">I scribble here</a>
Sandeep Chhabra
Ranch Hand

Joined: Aug 28, 2005
Posts: 340
Right,
Actually when the inner classes are marked static, they no longer remain inner classes, infact they can be treated just like a top level class, but since they are inside another class, they are also nested class.
so a static inner class is called Top Level Nested class.


Regards<br />Sandy<br />[SCJP 5.0 - 75%]<br />[SCWCD 1.4 - 85%]<br />------------------<br />Tiger, Tiger burning bright,<br />Like a geek who works all night,<br />What new-fangled bit or byte,<br />Could ease the hacker's weary plight?
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Hi,
Thanks for the correction..!!!

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1531
Kumar, Sravan and sandeep thank you all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Nested class