Garbage collection of referenced objects in Java
<p>I have the following code:</p>

<pre><code>class Test {
   public static void main(String[] args) {
      String a,b,c;
      a = new String(args[0]);
      b = a;
      a = null;
      b = null;
   }
}
</code></pre>

<p>Can someone tell me when a will be eligible for garbage collection. I think it's after b is made null because don't a and b reference the same object ?</p>
