Why does the code below throw null pointer exception? I would expect the equivalence to be simply false. Can someone explain what happens under the hood and the reason for this design decision?
Integer i = null;
System.out.println(i == 10); // Throws a null pointer exception