Self Test Questions:
Question 1
Given:
class GCTest {
Short story = 200;
GCTest go(GCTest cb) {
cb = null;
return cb;
}
public static void main(String[] args) {
GCTest c1 = new GCTest();
GCTest c2 = new GCTest();
GCTest c3 = c1.go(c2);
c1 = null;
// do Stuff
} }
When // doStuff is reached, how many objects are eligible for GC?
A. 0
B. 1
C. 2
D. Compilation fails
E. It is not possible to know