Kumar Raja wrote:There should be some simple way, which we are forgetting to print the value directly from Double, without scientifc notation.
'f' '\u0066' Requires the output to be formatted using decimal format. The localization algorithm is applied.
The result is a string that represents the sign and magnitude (absolute value) of the argument. The formatting of the sign is described in the localization algorithm. The formatting of the magnitude m depends upon its value.
If m NaN or infinite, the literal strings "NaN" or "Infinity", respectively, will be output. These values are not localized.
The magnitude is formatted as the integer part of m, with no leading zeroes, followed by the decimal separator followed by one or more decimal digits representing the fractional part of m.
The number of digits in the result for the fractional part of m or a is equal to the precision. If the precision is not specified then the default value is 6. If the precision is less than the number of digits which would appear after the decimal point in the string returned by Float.toString(float) or Double.toString(double) respectively, then the value will be rounded using the round half up algorithm. Otherwise, zeros may be appended to reach the precision. For a canonical representation of the value, use Float.toString(float) or Double.toString(double) as appropriate.
Kumar Raja wrote:I tried with all the flags -,#,0 but none of them could result in what I'm looking for, i.e to print the value as it is without any extra padding.