File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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 = 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

marc weber

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
It is sorta covered in the JavaRanch Style Guide.
subject: Inner class compile time errors
Similar Threads
Method local inner class
Access to inherited static members of inner classes
Marcus mock exam 2 (quest. #32)
Inner classes