|
Sep
03
|
The Double class contains a number of (static) methods for converting to/from various formats. To convert to a double use static method Double.parseDouble()
String s = "123.456";
try
{
double d = Double.parseDouble(s);
}
catch (NumberFormatException ex)
{
// s is not a double
}



Recent Comments