title: Why does Object == null work?
body: <p>So when we are comparing objects, we use equals() methods, or something similar in an if statement for example. If we have the following code</p>
  
  <pre><code>String a = "foo";
  String b = "foo";
  return a==b
  </code></pre>
  
  <p>we would get false returned to us because a and b refer to different objects. On the other hand,</p>
  
  <pre><code>String a = null;
  return a == null
  </code></pre>
  
  <p>we would get true. Why is that?</p>