java.lang.Double.toString method will truncate the string representation of the object and seems to produce inconsistent results.
Small testcase to use:
public class DoubleTest
{
public static void main (String[] args)
{
Double d1 = new Double (1234.123);
String str1 = d1.toString();
System.out.println("d1 value is : " + str1);
String str2 = Double.toString(12345.1234);
System.out.println("Double value of string is : " + str2);
}
}
Small testcase to use:
public class DoubleTest
{
public static void main (String[] args)
{
Double d1 = new Double (1234.123);
String str1 = d1.toString();
System.out.println("d1 value is : " + str1);
String str2 = Double.toString(12345.1234);
System.out.println("Double value of string is : " + str2);
}
}