Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Inner class compile time errors  RSS feed

 
Venkat Ramsimha
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
class OuterInnerImp
{
public static void main(String[] args)
{

}
public void method()
{
OuterInnerImp 0 = new OuterInnerImp();
OuterInnerImp.Inner i = O.new Inner();
i.inner();
}

class Inner
{
public void inner()
{
System.out.println("in the inner");
}
}
}

Hi All,
The above program is giving compile time errors can anybody provide with explanation for rectifying compile time errors

Thanks,
venkat
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Venkat Ramsimha:
...can anybody provide with explanation for rectifying compile time errors...

You used a zero rather than an uppercase "O" for your variable name. (In Java, names cannot start with digits.)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!