class Main
{
public static void main(String args[])
{
Runnable task = () -> {
String threadName = Thread.currentThread().getName();
System.out.println(threadName);
};
task.run();
Thread thread = new Thread(task);
thread.start();
System.out.println("Done!!");
}
}
Last active
June 5, 2016 12:05
-
-
Save smamran/1108bc7f7d272aef2609 to your computer and use it in GitHub Desktop.
Java 8 Thread Creation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment