Get a primer on the basic syntax of lambda expressions and learn about target types, then find out how lambdas interact with scopes, local variables, the this and super keywords, and exceptions in your Java programs. Finish off by reviewing predefined functional interfaces.
It's well known that Java 8's main contribution to the Java language is the lambda expression. A 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: