Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clarification n Innerclass

 
Arun Kumaar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Could someone explain me the working, when the line10&11 commented and line 6&7 are included(in the program) the program works fine.

The error i get (with line10&11 included) & also explain a brief summary of the error.

( tags added - simple really)
[ May 03, 2005: Message edited by: Barry Gaunt ]
 
Henry Wong
author
Marshal
Pie
Posts: 20907
76
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Arun Kumaar:

The error i get (with line10&11 included) & also explain a brief summary of the error.


It has nothing to do with inner classes. In line 11, you are making a call to the Inner() method, which is not allowed. You can't just place code anywhere in a class.

Henry
 
Joyce Lee
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Arun]: The error i get (with line10&11 included) & also explain a brief summary of the error.

As Henry already mentioned, line 11 is the culprit for the compile-time error, line 10 is perfectly legal.

To eliminate this error, you can try enclosing line 11 with curly braces like this:


Joyce
[ May 02, 2005: Message edited by: Joyce Lee ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic