How many objects are eligible for garbage collection once execution has reached the line labeled Line A?
String name;
String newName = "Nick";
newName = "Jason";
name = "Frieda";
String newestName = name;
name = null;
//Line A
a) 0
b) 1
c) 2
d) 3
e) 4
I would say 3 objects that is "Nick" after it was reassigned to Frieds. Then Frieda, after it was reassigned to null and newest name, since reassigning it to name and then to null.
Am i right