I have tried a simple java program to round off the Float value
float value = 0.525f;
System.out.println(Math.round(value * 100.0d) / 100.0f)
Getting Output is - 0.52
But expected is - 0.53
When I debug the value of float value
variable it is showing me 0.5249999761581421
something like. I think because of only this reason it is not rounding correctly.
Please help me if anyone knows how to round the float value up to two decimal places.