QUESTION 50자격증/OCJP_ExamA2018. 7. 8. 19:18
Table of Contents
반응형
QUESTION 50
Given:
1. interface Animal { void makeNoise(); }
2. class Horse implements Animal {
3. Long weight = 1200L;
4. public void makeNoise() { System.out.println("whinny"); }
5. }
6.
7. public class Icelandic extends Horse {
8. public void makeNoise() { System.out.println("vinny"); }
9. public static void main(String[] args) {
10. Icelandic i1 = new Icelandic();
11. Icelandic i2 = new Icelandic();
12. Icelandic i3 = new Icelandic();
13. i3 = i1; i1 = i2; i2 = null; i3 = i1;
14. }
15. } When line 14 is reached, how many objects are eligible for the garbage collector?
A. 0
B. 1
C. 2
D. 3
E. 4
F. 6
Solution : E
반응형
'자격증 > OCJP_ExamA' 카테고리의 다른 글
QUESTION 52 (0) | 2018.07.08 |
---|---|
QUESTION 51 (0) | 2018.07.08 |
QUESTION 49 (0) | 2018.07.08 |
QUESTION 48 (0) | 2018.07.08 |
QUESTION 47 (0) | 2018.07.08 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상