Card 16 / 32: 1. class Eco { 2. public static void main(String[] args) { 3. Eco e1 = new Eco(); 4. Eco e2 = new Eco(); 5. Eco e3 = new Eco(); 6. e3.e = e2; 7. e1.e = e3; 8. e2 = null; 9. e3 = null; 10. e2.e = e1; 11. e1 = null; 12. } 13. Eco e; 14. } At what point is only a single object eligible for GC?
A)
1
B)
2
C)
3
D)
compilation fails
E)
An exception is thrown at runtime.
Answer:
E) An exception is thrown at runtime.
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|