Oracle
1Z0-851 · Question #157
1Z0-851 Question #157: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #157. The question stem and answer options stay visible for context.
Question
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.)
Options
- Alist.add("foo");
- BObject o = list;
- CString s = list.get(0);
- Dlist = new ArrayList<String>();
- Elist = new ArrayList<Object>();
Unlock 1Z0-851 to see the answer
You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.