Search⌘ K

Consumer Functional Interface

Learn about the Java 8 Consumer functional interfaces that accept inputs but produce no results. Understand the different types like Consumer, BiConsumer, and their primitive counterparts, along with how to chain operations using the default andThen method.

We'll cover the following...

Consumers are functional interfaces that take in a parameter and do not produce anything.

Below are some of the functional interfaces which can be categorized as Consumers.

Consumer<T> Represents an operation that accepts a single (reference type) input argument and returns no result void accept(T t)
DoubleConsumer Accepts a single double-value argument and returns no result void accept(double value)
IntConsumer Accepts
...