f3 refers to f1.f, so f1 is not eligible for gc. Further, f1.f refers to f2, so f2 also is not eligible for gc. So... is it that both options are correct (i.e. no object is eligible for gc at GC point 2)?
Need to brush up gc fundamentals again
Joined: Nov 28, 2011
Got it. Just ignored the simple fact. Since nothing is returned from the method, all the objects created in the method should be available for GC. Additionally, nothing is persisted in the static field. Thank you guys.