title: Why is it the the following does not print true for the objects created using an object that was just set to null?
body: <p>I am currently in the process of obtaining my Oracle certification and this is one of the concepts that I am failing to grasp. The following code snippet does not print true even though I expect it to:</p>
  
  <pre><code>interface I {
  }
  class A implements I{   
  }
  class B extends A{  
  }
  class C extends B{  
  }
  public class Test {
      public static void main(String... args) {
          A a = new C();
          B b =(B)a;
          C c =(C)a;
          a = null;
          System.out.println(b==null);
  
      }
  }
  </code></pre>
  
  <p>Why do I expect a true? b was created using a and a has now been set to null.</p>