• Post Reply Bookmark Topic Watch Topic
  • New Topic

<identifier> expected & illegal start of expression  RSS feed

 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody please help me. I am new to Java and some what lost. I continue to receive <identifier> expected & illegal start of expression.
On line 21 I receive <identifier> expected
on line 36 I receive illegal start of expression
on lines 47 - 54 I receive Class, interface, or enum expected
I know it has something to do with { } but I can't seem to find the problem, would ya'll please help me. Thanks for your time and effort Danny

Here is the code

 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Danny Broadwater wrote:Can somebody please help me. I am new to Java and some what lost. I continue to receive <identifier> expected & illegal start of expression.
On line 21 I receive <identifier> expected
on line 36 I receive illegal start of expression
on lines 47 - 54 I receive Class, interface, or enum expected
I know it has something to do with { } but I can't seem to find the problem, would ya'll please help me. Thanks for your time and effort Danny


Generally, when you get these types of errors, it is a good idea to only deal with the first one, and then recompile. Anyway, with the first error, the mistake starts at line 16. I believe you may be trying to create an inner class, but the syntax is wrong.

Henry
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you I got the first on and the second ones fixed. Now working on the last ones 49 - 54. thanks for your time and effort. Danny
 
Campbell Ritchie
Marshal
Posts: 56562
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Illegal start may be caused by having more {s than you think.
Identifier expected might be because you have written a keyword by mistake.
Class interface or enum expected at the end of the file often means more }s than you think.
EXITONCLOSE doesn't exist. You can find what you should use in the JFrame documentation.
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your time and effort. Danny
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!