<<< Float.parseFloat | Index | >>> |
To convert a String consisting of a decimal number to a value of the type double, we use the following expression:
Double.parseDouble(strExpression)
For example,
Double.parseDouble("345.78") = 345.78 Double.parseDouble("-782.873") = -782.873
parseDouble is a method of the class Double, which is used to convert a numeric decimal string into an equivalent value of the type double
<<< Float.parseFloat | Index | >>> |