QUESTION 7자격증/OCJP_ExamB2018. 7. 9. 15:29
Table of Contents
반응형
QUESTION 7
Given:
3. import java.util.*;
4. public class G1 {
5. public void takeList(List<? extends String> list) {
6. // insert code here
7. }
8. }
Which three code fragments, inserted independently at line 6, will compile? (Choose three.)
A. list.add("foo");
B. Object o = list;
C. String s = list.get(0);
D. list = new ArrayList<String>();
E. list = new ArrayList<Object>();
Solution : BCD
반응형
'자격증 > OCJP_ExamB' 카테고리의 다른 글
QUESTION 9 (0) | 2018.07.09 |
---|---|
QUESTION 8 (0) | 2018.07.09 |
QUESTION 6 (0) | 2018.07.09 |
QUESTION 5 (0) | 2018.07.09 |
QUESTION 4 (0) | 2018.07.09 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상