This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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!
 
Consider Paul's rocket mass heater.
 
subject: 'identifier' & 'illegal start of type' messages???
 
Similar Threads
Help on testprogram and subclass please
illegal start of type
Ternary operators in System.out.println()
extra credit in class but stuck on persentage rates
Java Help