• Post Reply Bookmark Topic Watch Topic
  • New Topic

error message  RSS feed

 
Dwayne Loving
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to those who assisted me with some guidance in my "prompt for more input" question. When I compiled I went from 12 to 3 errors. Now my last issue is to what this error message
illegal start of expression. Part of my segment to which this refers to reads as follws: //Instance Variables public double enterdollars() return enterdollars. I've looked everywhere from Java tutorial to around here at java ranch. Could someone please point this out to me.

Thanks,
Dwayne
 
Harish Kashyap
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if it appears like this in your code then the return statement must have a terminating semi-colon and must be enclosed within curly braces.
i.e.
//Instance Variables
public double enterdollars()
{ return enterdollars; }
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dwayne,

Please see my comment in your other post about how to post your source code here with the UBB code tags.

then, go ahead and post your code, along with the exact, and complete, error message. we'll be happy to help.

Also, you don't need to start a new thread for this question... you've already asked about it in the other thread, so now folks are gonna have to figure out which one is the active one if they want to help. Or, you might get conflicting answers on the way to handle things. You can keep asking as many new questions in the same thread as you want, especially when they're all related to the same problem - in this case, your code not compiling.

We're all here to help, but these tips will make it easier for us to help you.

thanks!!!
[ May 27, 2005: Message edited by: fred rosenberger ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!