Double.toString

Double.toString

Class Overview | Class Members | This Package | All Packages

Syntax
public static String toString( double d )
Parameters
d
the double to be converted.
Returns
a string representation of the argument.
Description
Creates a string representation of the double argument.

The values NaN, NEGATIVE_INFINITY, POSITIVE_INFINITY, -0.0, and +0.0 are represented by the strings "NaN", "-Infinity", "Infinity", "-0.0", and "0.0", respectively.

If d is in the range 10-3 <= |d| <=107, then it is converted to a string in the style [-]ddd.ddd. Otherwise, it is converted to a string in the style [-]m.ddddE±xx.

There is always a minimum of one digit after the decimal point. The number of digits is the minimum needed to uniquely distinguish the argument value from adjacent values of type double.