Java8 brings many features which help us to code like Functional programming in an OO context. One of the important and useful features is method reference, In this article, we will do a detailed discussion about method reference.
What is a Method...
Home » Archives for November 2017
Java8:Effective use of Consumer Functional Interface
in
java interview questions,
java8,
java8feature
- on November 20, 2017
- No comments

Java8 provides a functional interface called Consumer, Whose signature looks like following
@FunctionalInterface
public interface Consumer<T> {
void accept(T t);
default Consumer<T> andThen(Consumer<?...