After line 8 executes there is only one object which has no references to it because the reference contained in variable name is copied to newestName on line 6. Here's how I understand the references work in this case:
1) line 2: variable newName is assigned a reference to
String "Nick"
2) line 3: variable newName is assigned a reference to String "Jason"
3) line 4: variable name is assigned a reference to String "Frieda"
4) line 6: variable newestName is assigned to refer to the same String as name, "Frieda"
5) line 8: variable name's reference is nullified. How ever the variable newestName's reference is as it was.
The only object that has lost all references to it by now is the String object "Nick".
Hope I made sense to you