• Post Reply Bookmark Topic Watch Topic
  • New Topic

SelfServe.java:50: '{' expected class RegularFuel()  RSS feed

 
John Beese
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
//declaration codes omitted




Ive counted and recounted the brackets almost a dozen times and they are even, could anything else be causing this error?
 
Stephan van Hulst
Saloon Keeper
Posts: 7987
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John. I suggest you count again. And work on your indentation.
 
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

Also, classes don't take parameters, so RegularFuel() as a class don't make sense.

Henry
 
Stephan van Hulst
Saloon Keeper
Posts: 7987
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, that one went right over my head!
 
John Beese
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Henry, i removed those () and the error went away, but 3 more popped up.... heh back to trying to figure this out.
 
John Beese
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sigh this keeps getting better and better,



its compiles and runs but if i try to use the premium button first i get a whole bunch of errors and it doesnt calculate, if i put in the regular one first, then i can use the premium one runs fine. what gives?
 
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
John Beese wrote:sigh this keeps getting better and better,



its compiles and runs but if i try to use the premium button first i get a whole bunch of errors and it doesnt calculate, if i put in the regular one first, then i can use the premium one runs fine. what gives?


You do know that, that piece of code, when formatted correctly, is this ... right?



Henry
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, formatted with proper braces, you have this, which is probably not what you want:

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!