Question about latest binary build

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Jul 20 02:32:39 PDT 2012


On 19/07/12 21:51, Steven Simpson wrote:
> On 19/07/12 18:47, Dan Smith wrote:
>> Actually, the rules have been relaxed, and your example should work, once the change is implemented in the compiler.
> Not with that semicolon in there...
Right - the semi-colon will still produce an error - the distinction 
between expression lambda (body == expression) and statement lambda 
(body == block) is still there.
>
>> public class TestSimple {
>>
>>       public static void main( final String... args ) {
>>
>>           new Thread( () -> System.out.println("Hello World");
>> ).start();
>>
>>       }
>>
>> }
>>
>> Give:
>>
>> TestSimple.java:6: error: ')' expected
>>           new Thread( () -> System.out.println("Hello World"); ).start();
>>                                                              ^
>
>




More information about the lambda-dev mailing list