Syntax decision

Peter Levart peter.levart at marand.si
Thu Sep 8 23:55:31 PDT 2011


On 09/08/11, Brian Goetz wrote:
> Here are some examples of lambda expressions using this syntax:
> 
>    x => x + 1
>    (x) => x + 1
>    (int x) => x + 1
>    (int x, int y) => x + y
>    (x, y) => x + y
>    (x, y) => { System.out.printf("%d + %d = %d%n", x, y, x+y); }
>    () => { System.out.println("I am a Runnable"); }

Hurray!


More information about the lambda-dev mailing list