Category Archives: Java Lambda

Java Lambda – Function apply example

java.util.function.Function is an interface and has been introduced in java 8. Function is a functional interface. So it can be used to accept lambda expression. Function accepts one argument and returns the result. Function interface contains one method that is apply(). This is the functional interface method. Find the declaration of apply() method. R apply(T t) Where T… Read More »

Java Lambda Expressions

Java lambda expressions are the newest and one of the best additions in Java 8. Java lambda expressions are Java’s one of the first approaches into functional programming. A Java lambda expression is thus a function which can be created without belonging to any class. A lambda expression can be passed around as if it was an object and executed on demand. Benefits of using Lambda expressions : To provide the… Read More »