Where did this code some from? Was it K&B?
Quote your sources.
Lines 18-19
c1 --> (MyClass)
c2 --> (MyClass)
Lines 20-21
c1 --> (MyClass - with z --> c2)
c2 --> (MyClass - with z --> c1)
Line 22
c3 --> (MyClass)
Lines 23-24
c1 --> c3
c2 --> c3
c3 --> (MyClass)
?? --> (MyClass - with z --> c2)[was c1]
?? --> (MyClass - with z --> c1)[was c2]
There is nothing on the stack referring to the objects that c1 and c2 used to refer to, they are both eligible. Answer is 2.
Judging by what you have said before the code, you have misunderstood what was happening. I suggest you go through is again carefully.