Lambda Expression

Java lambda expression is introduced in Java SE 8. It allows us to create an anonymous function that implements a specific type of interface called function interface.

Interfaces with a single abstract method are known as functional interface. These interfaces are also known as SAM (Single Abstract Method). Java 8 has introduced an annotation @FunctionalInterface, which is used for checking compilation level error i.e. an interface annotated with @FunctionalInterface cannot have more than one abstract method.

Learn more about the Lambda expression..