What is the lambda expression, in the encyclopedia explanation is
A lambda expression is an anonymous function, which is named after the lambda calculus in mathematics and directly corresponds to the Abstraction), is an anonymous function, that is, a function without a function name. A lambda expression can represent closures (notice differs from the traditional mathematical sense).
In Java I understand that it is an anonymous class, or an argument expression ( an executable block of code with parameters ).
(Type1 param1, Type2 param2, ..., Typen paramn), { statment1; Statment2; //............. return STATMENTM;}
Multi-parameter Lambada expression (java8 pseudo-code):
JAVA8: (int x,int y)->{ return x+y; }; or (int x,int y) (x+y), or (x, y)-> (x+y);
JAVA8 before: int add (int x,int y) {
return x+y;
}
Single-parameter Lambada expression
j ava8: (int x)- >{ return x ; (x), or x-> (x);
Non-parametric Lambada expression
JAVA8: ()---(.....)
Java8 lambda expression-syntax