nerdexam
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

  1. BiPredicate<String, String> bp = (String s1, String s2) -> s1.contains("SG") &&
  2. s2.contains("Java");
  3. BiFunction<String, String, Integer> bf = (String s1, String s2) -> {
  4. int fee = 0;
  5. if (bp.test(s1, s2)) {
  6. fee = 100;
  7. }
  8. return fee;
  9. };
  10. int res1 = bf.apply("D101SG", "Java Programming");
  11. System.out.println(res1);
What is the result?

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.

Full 1Z0-809 Practice