aspose file tools*
The moose likes Beginning Java and the fly likes Static Inner Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Static Inner Class" Watch "Static Inner Class" New topic
Author

Static Inner Class

Willie Toma
Ranch Hand

Joined: May 11, 2001
Posts: 78

Why do I get an error in the previous code when it is placed inside a class? "Invalid method declaration; return type required on line 4"

[This message has been edited by Willie Toma (edited December 10, 2001).]
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
You can't have your System.out.println() statement floating free within a class. Try putting it within a method inside your inner class, and your compilation error should go away.
Jason
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Static Inner Class
 
Similar Threads
Nested top-level class .....
Operator Precedence involving && and ||
HOw does this work.. the ans is 4 but there is no return statement
Implicitly declared static nested classes
Regarding static blocks