• Post Reply Bookmark Topic Watch Topic
  • New Topic

Errors "not a statement"  RSS feed

 
Ben Stevenson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am EXTREMELY new to Java programming and am trying to set up a bank account statement for a class, but I just can't get it right. Here is what I have:

starting balance - $500 (don't enter the dollar sign)
annual interest rate - 1.5
monthly pay - $1000 (don't enter the dollar sign)
withdrawal amount - $900 (don't enter the dollar sign)
Verify that you still earn $0.75 in interest and still have an ending balance at the end of the month of $600.75 as you did with the original code

I have entered this into jGrasp to get the outcome, but I keep getting errors. I am just trying to get a baseline so I can build on it:

[Added code tags - see UseCodeTags for details]

the error codes I get are:

StevensonWeek2.java:9: error: <identifier> expected
double balance500,
^
StevensonWeek2.java:10: error: not a statement
double interestRate0;00125;
^
StevensonWeek2.java:10: error: not a statement
double interestRate0;00125;
^
StevensonWeek2.java:11: error: <identifier> expected
double pay1000,
^
StevensonWeek2.java:12: error: not a statement
double cashNeeded900;
^

Please help me. I can't seem to figure out what these errors are.
Thank you!!
Week2Errors.jpg
[Thumbnail for Week2Errors.jpg]
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben Stevenson wrote:the error codes I get are:

Hint: Look at the END of that line.

Winston
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ben. Welcome to the Ranch!

As well as the problem Winston mentions, aren't you meant to be assigning some values to variables here? So I'd expect to see some '='s in there.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!