December 10, 2018

How to use java.util.function.Consumer functional interface in java – And different implementations using class, lambdas and method reference

Consumer is present in java.util.functions  package. It is a Functional Interface . In this article, we will use different ways to provide implementations for this interface. The Consumer implementation will take a String-input  and write it to console. The System.out.println  method can be replaced with other writers, like it can modified to write the contents to a file or […]

Read more