I understand what you are asking. I focused my answer on trying to explain one example of each situation, and now I see that clearly it wasn't what you were expecting, and I apologize for that.
But, my answer has something that can help me explain my point.
Charles O'Leary wrote:(Sybex page 36)
An object is no longer reachable when one of two situations occurs:
The object no longer has any references pointing to it.All references to the object have gone out of scope.
In my opinion, by "All references to the object have gone out of scope", I think the authors were talking about variable scopes. A reference variable is still a variable, so it has a scope.
Like in this code
In the code above, the reference variable
car will be out of scope when the method go() ends, so the object will be unreachable.
But when "All references to the object have gone out of scope", it implies that the object no longer has any references pointing to it, which clashes the two definitions.
And by "The object no longer has any references pointing to it", I understand it like when we point a reference to null, or another object, and the old object has no reference to it anymore.
I agree with you, it's a little confusing, since if I point null to a reference variable, this reference variable is still on scope, but it doesn't point to its object anymore.
So, I don't think that those two definitions that you mentioned are "mutually exclusive".
Concluding, I think the authors were trying to separate this two concepts, to separately exemplify that an object becomes eligible for GC when the program forces the object to lose its reference, or when the reference variable points to an object, but this variable goes out of scope.
When we put this two concepts together, they become similar.
I hope we can keep this nice discussion.
Maybe we could leave this to a more experienced programmer around here, but I'm here to give my opinion, if you want to.