The reserved type name `var` can now be used when declaring the formal parameters of a lambda expression ([JEP 323](http://openjdk.java.net/jeps/323)). This builds on the ability in Java SE 10 to use `var` when declaring local variables. Using `var` for a formal parameter of a lambda expression causes the type of the parameter to be inferred, using the same rules as when neither `var` nor an explicit type is present. Lambda expressions have allowed their formal parameters to be declared without explicit types since Java SE 8. If `var` is used for any formal parameter of a lambda expression, then it must be used for all formal parameters of that lambda expression.
|