This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inner class

 
shri Sonparote
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sri,

Modify your code with:
 
shri Sonparote
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you

Chandra
 
shri Sonparote
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic