[Java8] – Threads with lambdas

Example:

@Test
public void myMethod(){
    Runnable run = () -> {System.out.println("Execute Runnable");};
    new Thread(run).start();
}

Console :

Screen Shot 2016-06-04 at 6.03.44 PM

1 Comment

  1. I’ve been browsing on-line greater than three hours as of late, yet I never found any interesting article like yours.

    It is pretty worth sufficient for me. In my view, if all web owners
    and bloggers made just right content as you probably did, the web can be much
    more useful than ever before.

    Like

Leave a comment