In line1, we are doing is that, just giving a new refenrce, z, to the object referred by y. so both y and z are pointing to the same object. In line2, we are assigning the refernce, z to null. ie, only changing the refernce, z. Still, y is pointing to the object. So, this won't be available for garbage collection. So the answer will be right.
I have changed the code a little bit. When you set yy to null, it has no effect on y. So y refers to the integer object with value 99 and x refers to integer object with value 10 when the statement in question is reached.