Monday, June 20, 2011

Java Float class valueOf method automatically rounds string

I encountered this problem when I try to do something like:


The result Float value is automatically rounded to 123456.00.
In order to preserve the precision, I need to use Double.


BTW, my jdk version is 1.6.