I.e., in
class A {
public String s;
}
and
A a1 = new A();
a1.s = \"bla\";
A a2 = new A();
a2.s = a1.s;
a1 = null;
The object A1 is eligible for GC as now it is set to be null. But as String "bla" in not available for GC because it also referred by a2.s. So only a1 object is available for GC.
If this is the case
A a1 = new A();
a1.s = "bla";
A a2 = new A();
a1 = null;
then both a1 object and "bla" is available for GC. Because all references of "bla" is removed but now the case is
a2.s = a1.s;
a2 is refering to same string "bla". So string is available in stringpool not for GC