GeeCON Prague 2014*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Inner class compile time errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


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

Inner class compile time errors

Venkat Ramsimha
Ranch Hand

Joined: Dec 28, 2004
Posts: 127
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

Joined: Aug 31, 2004
Posts: 11343

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.)


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inner class compile time errors