aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes outerInstance.new InnerClass[] { }; Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "outerInstance.new InnerClass[] { };" Watch "outerInstance.new InnerClass[] { };" New topic
Author

outerInstance.new InnerClass[] { };

Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
I want to declare an array of type InnerClass but I don't know how.


The program will compile if I use:
However, I will not be able to instatiate a new InnerClass[] from somewhere outside class OuterClass. I can get away with that here because InnerClass is in class scope.

This will not compile:

[ February 18, 2004: Message edited by: Garrett Smith ]

comp.lang.javascript FAQ: http://jibbering.com/faq/
Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
OK. I think I figured it out.
With a array declaration, I specify the type, so OuterClass.InnerClass[].
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: outerInstance.new InnerClass[] { };