wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes 'identifier' & 'illegal start of type' messages??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark " Watch " New topic
Author

'identifier' & 'illegal start of type' messages???

James Brooks
Gunslinger
Ranch Hand

Joined: Aug 17, 2006
Posts: 165
Hi all!

Can someone please tell me why I'm getting 'illegal start of type' and '<identifier> expected' error messaged for the for-loop and the last message dialog for the below code:

Thanks!

-Patrick



Hello. My name is Inigo Montoya. You killed my father. Prepare to die.
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
I think that you are putting code in the class block {} when you really need to put it in a method block.

Something like this:

[ April 08, 2007: Message edited by: pete stein ]
James Brooks
Gunslinger
Ranch Hand

Joined: Aug 17, 2006
Posts: 165
Oops, yeah, silly mistake... Thanks!
 
GeeCON Prague 2014
 
subject: 'identifier' & 'illegal start of type' messages???