Oracle
1Z0-809 · Question #234
1Z0-809 Question #234: Real Exam Question with Answer & Explanation
The correct answer is B. 100. See the full explanation below for the reasoning.
Question
- BiPredicate<String, String> bp = (String s1, String s2) -> s1.contains("SG") &&
- s2.contains("Java");
- BiFunction<String, String, Integer> bf = (String s1, String s2) -> {
- int fee = 0;
- if (bp.test(s1, s2)) {
- fee = 100;
- }
- return fee;
- };
- int res1 = bf.apply("D101SG", "Java Programming");
- System.out.println(res1);
Options
- AA compilation error occurs at line 7.
- B100
- CA compilation error occurs at line 8.
- DA compilation error occurs at line 15.
Community Discussion
No community discussion yet for this question.