QUESTION 58자격증/OCJP_ExamC2018. 7. 26. 19:11
Table of Contents
반응형
QUESTION 58Given:public static Iterator reverse(List list) {Collections.reverse(list);return list.iterator();}public static void main(String[] args) {List list = new ArrayList();list.add("1");list.add("2");list.add("3");for (Object obj: reverse(list))System.out.print(obj + ", ");}What is the result?A. 3, 2, 1,B. 1, 2, 3,C. Compilation fails.D. The code runs with no output.E. An exception is thrown at runtime.Solution : C
반응형
'자격증 > OCJP_ExamC' 카테고리의 다른 글
QUESTION 60 (0) | 2018.07.26 |
---|---|
QUESTION 59 (0) | 2018.07.26 |
QUESTION 57 (0) | 2018.07.26 |
QUESTION 56 (0) | 2018.07.26 |
QUESTION 55 (0) | 2018.07.26 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상