🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.Function
  2. B.Predicate
  3. C.Supplier
  4. 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 →