I was wondering how the garbage collector in Java deals with the following situation.
Object A has a reference to Object B and Object B has a reference to Object C. The
Yes, B and C are eligible for garbage collection, if they can't be reached from any GC root (GC roots are usually all Threads and all references on the stack).