I am to convert a double value to a String.
double d=12345678.999;
String str = String.valueOf(d);
or, just plain
String str = ""+d;
Does it, however in the exponent form-- returning the String value:
1.2345678999E7
I need the value as is in the String:
12345678.999
Is there a way to do this? I can parse the string for the value of exponent-- the portion after 'E' and go from there, but there must be an easier way of doing this.
//===========================
EDIT:
the length of the decimal part in the input isn't known, it can be any number of digits:
12345678.999
or
12345678.9999999
Imposing a format for the decimal part would fix the number of decimal digits(?)