This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Inner class " Watch "Inner class " New topic
Author

Inner class

shri Sonparote
Ranch Hand

Joined: May 07, 2007
Posts: 30
Hi friends I have written two class file
first MyOuter



second main


this two classes are in same package

but //at line 18
I am getting compilation error that
No enclosing instance of type MyOuter is accessible to invoke the super constructor. Must define a
constructor and explicitly qualify its super constructor invocation with an instance of MyOuter (e.g.
x.super() where x is an instance of MyOuter).


Please tell me what i have missed?
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
Hi Sri,

Modify your code with:


cmbhatt
shri Sonparote
Ranch Hand

Joined: May 07, 2007
Posts: 30
Thank you

Chandra
shri Sonparote
Ranch Hand

Joined: May 07, 2007
Posts: 30
Thank you
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Inner class
 
Similar Threads
Inner Classes Q
Doubt in S&B book - Inner classes
inner class instantiation from outside the the outer class
why private member variable of inner class can't be accessed by its outer class but mehod can be?
Inner Class question..