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