Which two are valid statements? (Choose two.)
Which two are valid statements? (Choose two.)
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.
see 221 (same)
almost same as 22
ARE CORRECT
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
Tested Only C is correct