I need the rounding logic in the following pattern..for 2.23 it should be 2.2 ,for 2.26 it should be 2.3... Please Help out
double a = <ur NUmber>;
double roundOff = (double) Math.round(a*10)/10;
Hope this would help you. here 2.25 would be round off to 2.3
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments