Computer Applications
How do you convert a numeric string into a double value?
Java Library Classes
4 Likes
Answer
The wrapper class Double has a method parseDouble() which is used to parse a numeric string into a double value.
Syntax:
Double.parseDouble(String s);
Example:
String str = "437246.643";
double d = Double.parseDouble(str);
Answered By
2 Likes