阿摩線上測驗 登入

試題詳解

試卷:104年 - SCJP 151-200#99330 | 科目:OJCP(SCJP)

試卷資訊

試卷名稱:104年 - SCJP 151-200#99330

年份:104年

科目:OJCP(SCJP)

複選題
192. 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>();
正確答案:登入後查看