Kai Li I found this is really good question ? I don't understand when 20.5 is 21 why -20.5 is not -21. I tried the same with other languages I got it correct but JAVA ? Is any JAVA gurus are there to help us!!!
You don't need to be a Java expert to answer this question. All you have to do is to just look up the java.lang.Math API.
It says... public static long round(double a) Returns the closest long to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type long. In other words, the result is equal to the value of the expression: (long)Math.floor(a + 0.5d)