Java tutorial
import java.util.concurrent.TimeUnit; public class Main { public static void runThreadUseLambda() { new Thread(() -> System.out.println("")).start(); } public static void runThreadUseInnerClass() { new Thread(new Runnable() { @Override public void run() { System.out.println(""); } }).start(); } public static void main(String[] args) throws InterruptedException { runThreadUseLambda(); runThreadUseInnerClass(); TimeUnit.SECONDS.sleep(1); } }