Geoff -
For certification, terminology regarding the GC is very important. The line of code:
Object ex1 = new Object();
Does 3 things:
1) creates a reference variable 'ex1' that can refer to a object of type Object.
2) Creates an object (on the garbage collectible heap) of type Object.
3) refers 'ex1' to the new object.
When you get to the line :
ex1 = null;
You are dereferencing ex1 from the object. Assuming no other references to the object exist, at this point the object is eligible for garbage collection.
I think that when you talk about the object reference being eligible for garbage collection, you are mixing up concepts. Let's assume that 'ex1' is a local variable (not static, and not an instance variable), in that case, (ex1 being 'local') it lives on the stack, and it lives and dies according to stack rules. The garbage collector has nothing to do with the stack, it only removes abandoned objects from the heap.
If 'ex1' is an instance variable, then the correct answer would be - 'can't tell for sure'. The instance variable lives and dies according to when it's object lives and dies.
So in general, object references (variables) aren't ever, per se, eligible for garbage collection, only objects get garbage collected.
-Bert