[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]



I know, this is not really a question about Debian.

The question is actually very simple. I want to convert a 
string to a double.

There is a method in the java.lang.Double named 

When I insert a line like 
double d = Double.parseDouble(x);
in my program, I get the error:
Method parseDouble(java.lang.String) not found in class java.lang.Double

There is also another method in the java.lang.Double class that should do
the same,
i.e. method valueOf

Now, when I insert a line like
double d = Double.valueOf(x);
in the program, i get the error:
Incompatible type for declaration. Can't convert java.lang.Double to double.

in the program, 
(Casting does not solve this problem)

Does anybody know what is going wrong??



Reply to: