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 Classes 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 Classes" Watch "Inner Classes" New topic
Author

Inner Classes

Vicken Karaoghlanian
Ranch Hand

Joined: Jul 21, 2003
Posts: 522
can i have three class inside each other (see code)??? if i can, then how can i access the inner class named 'Outer1'? how can i create objects?

Note: this code compiles without any error.


- Do not try and bend the spoon. That's impossible. Instead, only try to realize the truth. - What truth? - That there is no spoon!!!
Vicky Nag
Ranch Hand

Joined: Jul 02, 2003
Posts: 40
class Outer
{
public class Inner
{
public class InnerInner
{
}
}
class Outer
{
public class Inner
{
public class InnerInner
{
}
}
public static void main(String args[])
{
Outer.Inner.InnerInner in = new Outer(). new Inner(). new InnerInner();
}
}
Hope This Helps.
V
Vicken Karaoghlanian
Ranch Hand

Joined: Jul 21, 2003
Posts: 522
hi Vicky, thx for the reply, but i didn't got the part where:

i don't see any similarity with:

this code is for two nested classes.

can you please explain it more clearly (what is happening)? i'll really appreciate it.
Vicken Karaoghlanian
Ranch Hand

Joined: Jul 21, 2003
Posts: 522
you might want to disregard my question cause i figured it out
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inner Classes