Java Functional Programming — Part 3

Fig 3. 1 forEach with BiConsumer in Java’s Map Interface

In the last part, we have seen one of the functional interfaces the Consumer. In this article, we look at the other variant of it — The BiConsumer.

We have seen that in the Consumer interface there is this abstract method accept(T t) with only one argument. And we also implemented several lambda expressions for this functional interface and also…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store