Java Learner logo

Module 10: Functional Programming and Streams

Lesson focus

Built-in Functional Interfaces

Meet Predicate, Function, Consumer, Supplier, and friends.

Predicate<T> exposes test; Function<T,R> maps values; Consumer<T> performs side effects.

Bi versions accept two parameters; UnaryOperator and BinaryOperator specialize Functions for identical types.

Compose functions with andThen, compose, and negate for reusable logic.

Lesson quiz

Which interface represents a supplier of values with no input?

Next lesson →