← Quiz: Java 8 Lambdas and Streams: all 10 questions
Quiz: Java 8 Lambdas and Streams · Question 2 of 10
Which functional interface returns a boolean?
Which functional interface returns a boolean?
- A.Function
- B.Predicate
- C.Supplier
- D.Consumer
Answer & explanation
Correct answer: Predicate
Predicate<T> has boolean test(T t).
Can you get the rest right without peeking?
Take the timed Quiz: Java 8 Lambdas and Streams quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →