Functional Programming with java 8 Function

java.util.function Inerfaces java.util.function is a package which contain multiple functional Interfaces. It is an Functional Interface used to assignment for lambda expression or method. For more information on Lambda https://linuxdeb.com/tut/lambda-expression/ e.g import java.util.function.Function;public class UTest { public static void main(String[] args) { Function<Integer, Integer> add5 = x -> x+5; // simplified lambda Function<Integer, Integer> add2 […]

Lambda Expression

Lambda expression is included in java SE 8. The Lambda expression is used to provide the implementation of an interface which has functional interface. Functional interface An Interface containing only one function are known as functional interface. You can annotate that interface with @FunctionalInterface to restrict that interface from adding more than one method. public […]

Scroll to top