Which package contains the standard interfaces Predicate, Function and Supplier?
Correct answer C. java.util.function
Explanation
The java.util.function package holds general-purpose functional interfaces that serve as target types for lambdas and method references. Predicate tests a value, Function transforms one and Supplier produces one. The java.util.stream package uses these interfaces heavily, which makes it a tempting choice, but it defines stream types rather than these interfaces.
Answer checked How we write and check questions
Discussion