Java is enhancing its language by extending the use of the reserved type var for lambda parameters. The sole purpose of this enhancement is to align the syntax of lambda parameters with the syntax of declaring local variables with var. The parameters of implicitly-typed lambda expressions have been inferred by the compiler since lambdas were introduced, in Java 8.
In this chapter, we'll cover the following topics:
- Implicitly and explicitly-typed lambda parameters
- How to use var with lambda parameters
- Using annotations with lambda parameters