QUESTION 37자격증/OCJP_ExamC2018. 7. 25. 00:57
Table of Contents
반응형
QUESTION 37Given:04. public class Tahiti {05. Tahiti t;06.07. public static void main(String[] args) {08. Tahiti t = new Tahiti();09. Tahiti t2 = t.go(t);10. t2 = null;11. // more code here12. }13.14. Tahiti go(Tahiti t) {15. Tahiti t1 = new Tahiti();16. Tahiti t2 = new Tahiti();17. t1.t = t2;18. t2.t = t1;19. t.t = t2;20. return t1;21. }22. }When line 11 is reached, how many objects are eligible for garbage collection?A. 0B. 1C. 2D. 3E. Compilation fails.Solution : A
반응형
'자격증 > OCJP_ExamC' 카테고리의 다른 글
QUESTION 39 (0) | 2018.07.25 |
---|---|
QUESTION 38 (0) | 2018.07.25 |
QUESTION 36 (0) | 2018.07.25 |
QUESTION 35 (0) | 2018.07.24 |
QUESTION 34 (0) | 2018.07.24 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상