File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 'identifier' & 'illegal start of type' messages???
 
Similar Threads
extra credit in class but stuck on persentage rates
Help on testprogram and subclass please
Java Help
illegal start of type
Ternary operators in System.out.println()