QUESTION 38자격증/OCJP_ExamC2018. 7. 25. 01:12
Table of Contents
반응형
QUESTION 38Given:interface Animal {void makeNoise();}class Horse implements Animal {Long weight = 1200L;public void makeNoise() {System.out.println("whinny");}}01. public class Icelandic extends Horse {02. public void makeNoise() {03. System.out.println("vinny");04. }05.06. public static void main(String[] args) {07. Icelandic i1 = new Icelandic();08. Icelandic i2 = new Icelandic();09. Icelandic i3 = new Icelandic();10. i3 = i1;11. i1 = i2;12. i2 = null;13. i3 = i1;14. }15. }When line 14 is reached, how many objects are eligible for the garbage collector?A. 0B. 1C. 2D. 3E. 4F. 6Solution : E
반응형
'자격증 > OCJP_ExamC' 카테고리의 다른 글
QUESTION 40 (0) | 2018.07.25 |
---|---|
QUESTION 39 (0) | 2018.07.25 |
QUESTION 37 (0) | 2018.07.25 |
QUESTION 36 (0) | 2018.07.25 |
QUESTION 35 (0) | 2018.07.24 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상