0 Replies Latest reply on Sep 19, 2013 11:30 AM by om*427016*19

    Lambda Expressions

    om*427016*19

      Hi Folks,

       

       

      This is my first day in Lambda world.

       

      And I cannot understand why this code works:

      new JButton().addActionListener(e -> {System.err.println("Hello from lambda");});

       

      And this doesn't:

      new Thread(r -> {System.err.println("Hello from lambda");}).start();

       

      What is the difference???

       

       

       

      Thanks!

       

      Omar