I use a number formatter provide by java to reduce the number of decimal places to two positions after the decimal places.
I have a float variable whose value is 3.44567
and i use number formatter as shown:
NumberFormat fmt = new DecimalFormat("#0.00");
And convert it by fmt.format(num)
Later when i print the variable it prints 3.44 but when i pass this value to a stored procedure whose type is float and after saving it the number exists in the original format i.e 3.44567.
I dont understand that while printing on the screen it prints properly but when i see the database i get all the numbers even after two decimal places.
Can anyone guide how to rectify this.