title: Confused about garbage collection
body: <p>In the following code how many objects are eligible for garbage collection after executing line 7?
  In my opinion 1 object that is z is eligible. Is is right?</p>
  
  <pre><code>public class Tester 
  { 
    public static void main(String[] args) 
    {
  
      Integer x = new Integer(3000);   
      Integer y = new Integer(4000);   
      Integer z = new Integer(5000);
  
      Object a = x;   
      x = y;  
      y = z;
      z = null; //line 7 
     }
  }
  </code></pre>
  
  <p>Thank you very much.</p>