Type a Runnable lambda and start it on a new Thread
Type a Runnable lambda and start it on a new Thread
Answer
Thread t = new Thread(() -> System.out.println("hello from thread")); t.start();
new Thread(runnable) creates the Thread object but does not start it. start() actually schedules execution on a new OS thread. The current thread continues immediately after start() returns.