I don't have the book here in front of me, but I think you are missing a subtle point.
In
Java, you do not pass objects. You can't. Java doesn't work that way.
What you are passing is the reference - or more specifically, a copy of the reference.
It's like passing a copy of a business card, or an address label that tells you where my house is.
so, let's go through this code (note: i'm changing it from Strings to MyClass so we don't have to worry about the string pool):
after line 1 executes, we have a MyClass object that lives in the heap. We also have a reference, mine1, that points to the object. it's like a notecard with my home address, and the object is my house. I carry around the notecard so i can find my house, I don't carry the actual house.
after line 2, we have a SECOND MyClass object on the heap, and second reference that points to this object.
when we call line 3, we make copies of the mine1 and mine2 reference - think of it as handing the method a photocopy of my home address.
line 4 takes these values/photocopies, and assigns them to the go method's s1 and s2.
at this point, we have mine1 and s1 BOTH pointing to the same object. We have two notecards with my home address on them. The same for mine2 and s2. Within the method we can't really access mine1 or mine2, but the references are still valid.
when on line 5 you set s1 to null, you erase the address off that card. That does not change the actual object, nor does it change mine1. mine1 still holds a valid reference to the object.
Line 6 does the same for the other object/references. s2 no longer points to the object, but mine2 does.
we then return from the method. Note that no object became elligible for GC within the go() method.
it is wrong to talk about "s1 being elligible" since s1 is a reference, not an actual object. if s1 currently refers to an object, then that object is by definition not elligible. if s1 does not currently refer to an object... there is no object to be talking about.