Lets have a look on some fundamentals of mathematics. It is very simple and everyone will recall it.
Rounding in Maths:
Consider we have to round till 4 digits after decimal point
1) 2.41255 will be rounded to ?????
2) 5.12413 will be rounded to ?????
Answer:
1. 2.4126
2. 5.1241
Above is the maths what we have studied...isnt it? But in JAVA do u know how rounding function works?
if( Do u know how rounding function works in JAVA ?){