- Lambda Expression: Lambda expression is anonymous function which takes in parameters and returns a value
- More compact code
- Less boiler plate code
- More readable and reusable code
- More testable code
- Parallel operations
A lambda expression (lambda) describes a block of code (an anonymous function) that can be passed to constructors or methods for subsequent execution. The constructor or method receives the lambda as an argument. Consider the following example:
(parameter1, parameter2) -> { code block }