a) System.out.println(Math . min ( -0.0 , 0.0 ) == 0);

-0.0 == 0.0 is always true

Math.min(-0.0,0.0) == 0

RHS of the above operation is int ZERO and gets promoted

to 0.0 as Math.min returns a double.

i.e., it is treated as Math.min(-0.0,0.0) == 0.0

Math.min(-0.0,0.0) returns -0.0

But -0.0 == 0.0 is always true as explained above

and this always prints true.

b) System.out.println(Math . max ( -0.0 , 0.0 ) == -0);

same explanation as above

c) System.out.println(Math . round ( Long . MAX_VALUE + 1.5) == Long . MAX_VALUE);

round function returns either a long value or int values

based on the type of parameter passed to round function.

In the above statement, the argument gets promoted to

double value (because 1.5 is of type double) and the

sume of Long.MAX_VALUE & 1.5 returns a double value that

is greater than in value what a Long.MAX_VALUE can represent

and as per JLS - 5.1.3, this returns a largest representable

'long' value which Long. MAX_VALUE.

d) System.out.println(Math . round ( Integer . MIN_VALUE - 6.5 ) == Integer . MIN_VALUE);

As Philip explained above, in this statement we are doing a double

operation and the round function returns a 'long' value. But this

case the result of operation is within the range of 'long' values

and whose result is less than Integer.MIN_VALUE, priting a value of

'false'.

e) System.out.println(Math . round ( Integer . MIN_VALUE - 6.5f ) == Integer . MIN_VALUE);

Same as above except that here the operation results in a float value

resulting in returning a 'interger' value from round function. As the subtractions results in a value that is less than the Integer.MIN_VALUE, this round operation results in returning Integer.MIN_VALUE as per JLS 5.1.3.

(note : JLS -

Java Language Specification, 2nd Edition).

Hope this clarifies things a bit more.