Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P1
    • Resolution: Delivered
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: tools
    • Subcomponent:
    • Verification:
      Verified

      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.

        Attachments

          Activity

            People

            • Assignee:
              vromero Vicente Arturo Romero Zaldivar
              Reporter:
              vromero Vicente Arturo Romero Zaldivar
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: