Lamda Expression Introduction



A lambda expression is a kind of anonymous function.
It does not have a name.
It does have body, return type and list of parameters and also it can have a list of exceptions that can be thrown.

Using lambda expression you can pass the implemented method as a argument in any another method.
Method implementation contains it behavior.
So, Lamda Expression supports the behavior parameterization.

Lamda Expression can work for functional interfaces only.
Functional interfaces are those interfaces which have only one abstract method. No more than one abstract method.

So, in normal word you can say Lamda Expression is an instance without name of any functional interface with respective method logic implementation, and that you can pass as parameter at the compatible argument.


The expected type for the lamda expression is called a target type.