Oracle
1Z0-809 · Question #191
1Z0-809 Question #191: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #191. The question stem and answer options stay visible for context.
Question
Given the code fragment:
List<String> l1 = Arrays.asList("Java", "J2EE", "J2ME", "JSTL", "JSP", "Oracle DB");
Predicate<String> pred = s -> s.contains("J2");
List<String> netL = l1.stream().filter(x -> x.length() > 3)
.filter(pred).collect(Collectors.toList());
System.out.println(netL);
What is the result?
Options
- AA compilation error occurs.
- B[Java, J2EE, J2ME, JSTL, JSP]
- Cnull
- D[Java, J2EE, J2ME, JSTL]
Unlock 1Z0-809 to see the answer
You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 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.