Exam 1z0-809 All QuestionsBrowse all questions from this exam
Question 138

What is the result?

    Correct Answer: B

    The code defines a BiPredicate and a BiFunction. The BiPredicate checks if the first string contains 'SG' and the second string contains 'Java'. The BiFunction applies this predicate and sets the fee to 100 if the condition is met. In this case, both conditions are true for the provided inputs 'D101SG' and 'Java Programming', so the fee is set to 100 and returned. Therefore, the output is 100.

Discussion
Abdullah_RahahleahOption: B

Answer is B==> 100 , tested 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 fee1=bf.apply("D101SG", "Java programming"); System.out.println(fee1);

Svetleto13Option: B

B,tested

petetsaiOption: B

Answer is B==> 100 , tested

steefaandOption: B

B is answer, tested.

duydnOption: B

B is correct, tested 22/09/2023

lnrdgstOption: B

feel = 100; B