Oracle
1Z0-809 · Question #198
1Z0-809 Question #198: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #198. The question stem and answer options stay visible for context.
Question
Given the code fragment: List<String> cs = Arrays.asList("Java", "Java EE", "Java ME"); // line n1 System.out.print(b); Which code fragment, when inserted at line n1, ensures false is printed?
Options
- Aboolean b = cs.stream().findAny().get().equals("Java");
- Bboolean b = cs.stream().anyMatch(w -> w.equals("Java"));
- Cboolean b = cs.stream().findFirst().get().equals("Java");
- Dboolean b = cs.stream().allMatch(w -> w.equals("Java"));
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.