Inaccuracy in totorial

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P4
    • None
    • Affects Version/s: 8u25
    • Component/s: docs
    • x86_64
    • windows_7

      A DESCRIPTION OF THE PROBLEM :
      The statement within lambda "System.out.println("x = " + x);" does not try to access the FirstLevel.x variable, but rather the parameter of the methodInFirstLevel.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      where the lambda expression myConsumer tries to access the methodInFirstLevel parameter:

      System.out.println("x = " + x);
      ACTUAL -
      where the lambda expression myConsumer tries to access the FirstLevel.x variable:

      System.out.println("x = " + x);

      URL OF FAULTY DOCUMENTATION :
      https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html

            Assignee:
            Unassigned
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: