| Author |
JOption problems
|
jamie keene
Greenhorn
Joined: Feb 15, 2011
Posts: 28
|
|
I had to convert a code to JOption and can't get it to compile
the error code reads
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14669
|
|
|
What is the returned type of the method you are calling here ? Did you check the API ?
|
[My Blog]
All roads lead to JavaRanch
|
 |
jamie keene
Greenhorn
Joined: Feb 15, 2011
Posts: 28
|
|
so now I am getting a new error
now it is saying loss of precision on miles parsedouble
|
 |
Rob Camick
Ranch Hand
Joined: Jun 13, 2009
Posts: 1785
|
|
Look at how you define your variables:
And look at how you try to parse them:
Does the parse method match the variable type?
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14669
|
|
You declared miles to be an int and weight to be a double. It looks like you're not calling parseInt/parseDouble for the right variables.
(ps: avoid calling your variables like xxxString. It's useless to put their type in their name)
|
 |
 |
|
|
subject: JOption problems
|
|
|