Java — 8 | BiFunction, BiConsumer & BiPredicate Interface with Example
We all are aware of Java-8 Streams. In streams, we use certain functional interfaces to validate the Stream functionality.
In the previous blog we have discussed about Consumer, Predicate and Supplier Interfaces. You can refer to that here.
In this article, we discuss about some of the other functional Interfaces which are similar to Consumer, Supplier and Function Interface yet with a difference in the number of arguments being passed to the function.
Before moving further let me discuss about function Interface first.
Function Interface
This interface represents the format Function<T,R>.
Here the Parameter represents
T — the type of the input to the function
R — the type of the result of the function
It has the method apply<T t> which takes the argument of type T and returns the result of type R.
public class FunctionApp…