java.lang.Float.toString() method will truncate the string representation of the Float object and seems to produce inconsistent results.
Small test case to use:
public class FloatTest
{
public static void main (String[] args)
{
Float f1 = new Float (1234.123f);
String str1 = f1.toString();
System.out.println("f1 value is : " + str1);
String str2 = Float.toString(12345.12345f);
System.out.println("Float value of string is : " + str2);
}
}
Small test case to use:
public class FloatTest
{
public static void main (String[] args)
{
Float f1 = new Float (1234.123f);
String str1 = f1.toString();
System.out.println("f1 value is : " + str1);
String str2 = Float.toString(12345.12345f);
System.out.println("Float value of string is : " + str2);
}
}