Oracle
1Z0-819 · Question #91
1Z0-819 Question #91: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-819 to reveal the answer and full explanation for question #91. The question stem and answer options stay visible for context.
Question
Given:
List<String> hsl = new LinkedList<String>();
Set<String> hs1 = new HashSet<String>();
String[] s = {"a", "b", "c", "b", "a"};
for (String st : s)
list1.add(st);
hs1.add(st);
System.out.print(hsl.size() + " " + list1.size() + " ");
HashSet hs2 = new HashSet(list1);
LinkedList list2 = new LinkedList(hsl);
System.out.print(hs2.size() + " " + list2.size());
What is the result?
Options
- A5 5 3 5
- B3 10
- C3 5
- D5 5 3 3
Unlock 1Z0-819 to see the answer
You've previewed enough free 1Z0-819 questions. Unlock 1Z0-819 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.