99. Given: 3. interface Animal{void makeNoise();} 4. class Horse implements Animal{ 5. Long weight = 1200L; 6. public void makeNoise(){System.out.println("whinny");} 7. } 8. public class lcelandic extends Horse{ 9. public void makeNoise(){System.out.println("vinny");} 10. public static void main(String[] args) { 11. Icelandic i1 = new lcelandic(); 12. Icelandic i2 = new lcelandic(); 13. Icelandic i3 = new lcelandic(); 14. i3 = i1; i1 = i2; i2 = null; i3 = i1; 15. } 16. } When line 14 is reached, how many objects are eligible for the garbage collector?
(A) 0
(B) 1
(C) 2
(D) 3
(E) 4
(A) 0
(B) 1
(C) 2
(D) 3
(E) 4
答案:登入後查看
統計: A(0), B(0), C(1), D(0), E(0) #2722988
統計: A(0), B(0), C(1), D(0), E(0) #2722988