Hi Sonir,
1. You mix up variables with the objects they reference to. These are two diferent things.
2. read the text of the question carefully.
It says:
which earliest line the object
originally referred by "a".
Strings are immutable. In contrast to StringBuffer you can't change the value of as
String variable without implicitly creating a new object (in the question compiler optimizations were ruled out.) So the variable "a" originally referred to a object to which no more references are pointing to, because variable a has been set to null in line 6.