Java SE 11 Developer (1Z0-819) — Question 179

Which two are valid statements? (Choose two.)

Answer options

Correct answer: B, C

Explanation

Option B is correct because it uses explicit types for both parameters, which is valid. Option C is also correct as it uses 'var' for both parameters while maintaining compatibility with the BiPredicate functional interface. The other options either mix types incorrectly or violate the rules for using 'var'.