1z0-819 Exam QuestionsBrowse all questions from this exam

1z0-819 Exam - Question 203


Which two are valid statements? (Choose two.)

Show Answer
Correct Answer: BC

A valid statement for a BiPredicate must have consistent parameter declarations according to the lambda syntax rules. Option (B) is correct because it declares both parameters with specific types, which is valid. Option (C) is also correct because it uses 'var' for both parameters, a permissible combination in lambda expressions. Other combinations mix 'var' with explicit types or don't follow valid patterns for lambda parameter declarations.

Discussion

5 comments
Sign in to comment
ASPushkin
Jan 3, 2024

see 221 (same)

ASPushkin
Jan 3, 2024

almost same as 22

d7bb0b2Options: BC
Jan 10, 2024

ARE CORRECT

ASPushkinOption: C
Jan 28, 2024

answer : C B is not correct BiPredicate test = (Integer x, final Integer y) -> (x.equals(y)); BiPredicate - raw type same as BiPredicate<Object, Object> BiPredicate<Object, Object> is not a subclass of BiPredicate<Integer, Integer> but BiPredicate test = (var x, var y) = x.equals(y); is correct

cathDev
May 31, 2024

Tested Only C is correct