Lambda expressions allow us to realize a more compact code and avoid anonymous inner classes. We can use them with functional interface. So, for instance, we can assign a lambda expression to a functional interface reference variable,  functional interface method parameter or functional interface returned type. The general  form is the following:
parameters list -> body
Here the video with different usage examples:
 
 
Nessun commento:
Posta un commento