Convert from String to double in Java
Description
The following code shows how to convert from String to double.
Example
/*from w w w. j av a2s. c o m*/
public class Main {
public static void main(String[] args) throws Exception {
Double d = Double.valueOf("0.9D").doubleValue();
System.out.println(d);
}
}
The code above generates the following result.
Home »
Java Tutorial »
Java Data Type »
Java Tutorial »
Java Data Type »