Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 762 Bytes

File metadata and controls

20 lines (15 loc) · 762 Bytes

Advance JAVA Programming

  1. Lambda Expression: Lambda expression is anonymous function which takes in parameters and returns a value

What are main advantage of using java 8?

  • More compact code
  • Less boiler plate code
  • More readable and reusable code
  • More testable code
  • Parallel operations

Lambda Expression:

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 }

lambda-expression