JDK-8202512 : Release Note: JEP 323: Local-Variable Syntax for Lambda Parameters
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 11
  • Priority: P1
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2018-05-01
  • Updated: 2018-10-18
  • Resolved: 2018-06-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11Resolved
Description
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.
Comments
The JDK 11 Release Notes have been updated with the change.
04-10-2018

Updated the Release Notes with changes.
24-09-2018