Mar 5, 2018

Lambda expressions address the bulkiness of anonymous inner classes by expressing the machinery of anonymous inner classes more compactly.

The general syntax of a lambda expression consists of a set of parameters, an arrow token, and a function body (either a single expression or a statement block):

(int a, int b) -> a * a + b * b;