What are lambda expressions in Java?

Java 8Object Oriented ProgrammingProgramming

The implementation of functional interfaces has simplified using lambda expressions in Java 8. The lambda expressions are functions as arguments in Java. The lambda expression introduces a new syntax element and operator in Java and refers to the lambda operator or the arrow operator (->).


interface Print {
   void print(String message);
public class LambdaExpressionTest {
   public static void main(String args[]) {
      Print myPrint = x -> System.out.println(x);
      myPrint.print("Java Lambda Expression!");


Java Lambda Expression!
Updated on 09-Jul-2020 13:48:33