I need to trunk a float number with one decimal place. For eg: i have a float number called total=95.20004. my result should be 95.2. I have tried with the DecimalForma, but it is not working out. Kindly help me to resolve this issue.
You should be more specific as to what you want to do with your truncated number. Do you want to put it in a `String`? Do you want to print it to the screen and keep the exact value in your variable? Do you want to truncate the result in … Read More
Edited by mvmalderen