I have this code which gives a result
double a = 128.73;
double roundOff = Math.round(a*100)/100;
System.out.println(roundOff);
Result is :- 128.0
what I need that if the values after dot is greater than 5 i.e (6, 7, 8 or 9) then its should give result by adding 1 to the given value that has to be rounded off, i.e
- 128.54 should give result to 128.0
- 128.23 should give result to 128.0
- 128.73 should give result to 129.0
- 128.93 should give result to 129.0