I have the following code:
class Test {
public static void main(String[] args) {
String a,b,c;
a = new String(args[0]);
b = a;
a = null;
b = null;
}
}
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 ?