What is the syntax and characteristics of a Lambda Expression in JAVA 8?
The syntax for the Lambda expression is:-
parameter -> expression body
- No need to declare the parameter type as the compiler will get the standard by the value of the parameter.
- For the multiple parameters parenthesis has to be declared, but for the simple parameter, parenthesis need not be declared.
- If a contains only a single parameter, then there is no need of curly braces.
Related Article: How should I start JSP and Servlet
Suggest An Answer
No suggestions avaliable!