wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Final Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Final" Watch "Final" New topic


meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305

FinalTemp.java:4: error: <identifier> expected
1 error

Don't understand problem !

My one regret in life is that I am not someone else.
- Woody Allen
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

You cannot put arbitrary statements, such as the assignment statement in line 3, at class level. Statements must be inside a method or constructor.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305

Jeff Verdegan

Joined: Jan 03, 2004
Posts: 6109

Mansukhdeep Thind,
Your post was moved to a new topic.
Moving the tangential discussion of certification in general to the MD forum
I agree. Here's the link: http://aspose.com/file-tools
subject: Final
Similar Threads
Final Variables
Compilation problem with if condition
final variable initialization
Doubt on byte literals
final variable in for loop declaration