posted 10 years ago
can you please let me know why the answer B is correc. iknow that min is -0.0,max is 0.0.but i'm not sure sbout the Math.min-0.0,+0.0)== Math.max(0.0,+0.0));

can sombody help with this question.

public void check()

2: {

3: System.out.println(Math.min(-0.0,+0.0));

4: System.out.println(Math.max(-0.0,+0.0));

5: System.out.println(Math.min(-0.0,+0.0) == Math.max(0.0,+0.0));

6: }

A) prints -0.0, +0.0 and false.

B) prints -0.0, +0.0 and true.

C) prints 0.0, 0.0 and false.

D) prints 0.0, 0.0 and true.

B is correct answer in Srinivas Majji's mockexam