class Bar{}
class Test{
Bar doBar(){
Bar b=new Bar();
return b;
}
public static void main(String arg[]){
Test t=new Test();
Bar newBar=t.doBar();
System.out.println("new bar");
newBar=new Bar();
System.out.println("finishing");
}
}At what poing is the Bar object,create on line 3,eligible for garbage collection?A.after line 8;
B.after line 10;
C.after line 4,when doBar() completes.
C.after line 11,when doBar() completes.