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 ?
It's probably worth noting that you should compare floating point numbers like this:
|x - y| < ε, ε very small