QUESTION 28자격증/OCJP_ExamC2018. 7. 24. 03:20
Table of Contents
반응형
QUESTION 28Given:1. import java.util.*;2. public class Example {3. public static void main(String[] args) {4. // insert code here5. set.add(new Integer(2));6. set.add(new Integer(1));7. System.out.println(set);8. }9. }Which code, inserted at line 4, guarantees that this program will output [1, 2]?A. Set set = new TreeSet();B. Set set = new HashSet();C. Set set = new SortedSet();D. List set = new SortedList();E. Set set = new LinkedHashSet();Solution : A
반응형
'자격증 > OCJP_ExamC' 카테고리의 다른 글
QUESTION 30 (0) | 2018.07.24 |
---|---|
QUESTION 29 (0) | 2018.07.24 |
QUESTION 27 (0) | 2018.07.24 |
QUESTION 26 (0) | 2018.07.24 |
QUESTION 25 (0) | 2018.07.24 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상