Quick Answer
Predicate: test(T t) returns boolean - used for filtering. Function: apply(T t) returns R - transformation. Consumer: accept(T t) returns void - side effects. Supplier: get() returns T - produces values. BiFunction, BiConsumer, BiPredicate handle two arguments. UnaryOperator is Function. BinaryOperator is BiFunction. These cover most functional programming needs.
Answer
Predicate tests conditions and returns boolean. Function transforms input to output. Consumer performs action without returning. Supplier provides a value without input.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.