I really can\'get my head around why the following happens:
Double d = 0.0; System.out.println(d == 0); // is true System.out.println(d.equals(0)); // is false ?
d.equals(0) : 0 is an int. The Double.equals() code will return true only for Double objects.
d.equals(0)
0
int
Double.equals()
Double