Loading double number in Tomcat -
i have problem loading double value sql database. when use jetty works fine, when change tomcat problem appears.
the problem decimal number 0,7 loaded 0.699999988079071. or number 0,77 loaded 0.7699999809265137
i've tried loading sentence:
decimalformat df = new decimalformat("#.##",new decimalformatsymbols(locale.english)); float.parsefloat(df.format(rst.getfloat("decimal_number"))); and still have error.
does have idea why happening?
thanks in advance.
read http://docs.oracle.com/cd/e19957-01/806-3568/ncg_goldberg.html.
then use double instead of float.
enjoy!
Comments
Post a Comment