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
solved Rounding Logic for decimal digits in java [duplicate]
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
solved Rounding Logic for decimal digits in java [duplicate]