Hi Kavita,
That is because Math.round returns the nearest
integer to the given value. Straight from the
java docs:
If the argument is negative infinity or any value less than or equal to the value of Integer.MIN_VALUE, the result is equal to the value of
Integer.MIN_VALUE.
If the argument is positive infinity or any value greater than or equal to the value of Integer.MAX_VALUE, the result is equal to the value of
Integer.MAX_VALUE.
Regards,
Manfred.