This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
You cannot put arbitrary statements outside methods.
The only thing you can do at class level (outside of a method) is declare variables and optionally initialize them. You cannot put other statements there, such as an assignment statement, which you have in line 4.