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 […]