aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Inner class" Watch "Inner class" New topic
Author

Inner class

meena latha
Ranch Hand

Joined: Jan 24, 2005
Posts: 219
This program gives compile error stating "enclosing instance that contains Outer.Inner is required.



Can anybody explain what that error means.
Thanks in advance
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
You have to call the superclass constructor on an instance of the enclosing class. I would have thought o.new would do it, but this version compiles:


Somehow, I doubt that Kathy would put this one on the SCJP exam.
[ February 28, 2005: Message edited by: Mike Gershman ]

Mike Gershman
SCJP 1.4, SCWCD in process
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inner class