Results 1 to 4 of 4
Thread: [SOLVED] Why does the compiler return "not a statement" for this method body please?
- 05-25-2009, 04:22 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 57
- Rep Power
- 0
-
You are multiplying two numbers, then dividing by 100, but what do you want to do with the result? My guess is that you want to either have the method return this result or else add this interest that you calculated to a variable, perhaps you want to add it to the balance.
So bottom line, either have the method return something (and if so, be sure that the return type is changed from void to double), or else use the number you calculate in a statement that has a variable on the left side of an equals sign, and this calculation on the right.
- 05-25-2009, 03:17 PM #3
Member
- Join Date
- Mar 2009
- Posts
- 57
- Rep Power
- 0
Hi, thanks for your reply. I realised after I had made the post that the statement was pretty much directionless so I immediately marked it solved.
I was working in the early hours and I think the birds had just started singing which possibly distracted me :o
Once again thank you for replying and your continued support.
-
Similar Threads
-
"Cached Item Was Locked" causing Select Statement: Hibernate + EHCache
By cloutierm in forum Advanced JavaReplies: 0Last Post: 03-15-2009, 11:53 PM -
Using Dr. Java for first time...."No compiler"
By gallimaufry in forum New To JavaReplies: 3Last Post: 10-28-2008, 01:02 AM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM -
"Any Body Help, Urgent".
By adeeb in forum NetBeansReplies: 5Last Post: 05-28-2008, 12:36 PM -
How to solve "No compiler error"?
By iceman in forum New To JavaReplies: 5Last Post: 04-22-2008, 03:37 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks