Quiz · Threads: a first look · lesson 4 of 6
Quiz — run instead of start
What does the program print?
public class Main {
public static void main(String[] args) {
Thread t = new Thread(() -> {
String name = Thread.currentThread().getName();
System.out.println(name);
}, "cook");
t.run();
}
}