• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

<identifier> expected & illegal start of expression

 
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your time and effort. Danny
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic