Convert a String to a double type Number in Java
Description
The following code shows how to convert a String to a double type Number.
Example
//from w w w. jav a2s . com
public class Main {
public static void main(String[] argv) throws Exception {
double d = Double.parseDouble("123.4e10");
System.out.println(d);
}
}
The code above generates the following result.
Home »
Java Tutorial »
Java Data Type »
Java Tutorial »
Java Data Type »