Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inner Local Classes

 
Saira Dhanani
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Need some help with the following program
When trying to print in the Non static local class the following error is encountered
C:\java>javac TLCWithLoacalClasses.java
TLCWithLoacalClasses.java:30: <identifier> expected
System.out.println("xyz");





Thanks for helping
Saira
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a simple syntax error. You are putting an executable statement "System.out.println("xyz");" in the wrong place. It needs to be in a method.
 
Saira Dhanani
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic