IntelliJ IDEA - Debug 调试多线程程序
新建 MyRunnable
public class MyRunnable implements Runnable {
@Override
public void run() {
Thread currentThread = Thread.currentThread();
System.out.println(currentThread.getName() + "-------------进入");
try {
TimeUnit.SECONDS.sleep(5);
} catch (InterruptedException e) {
e.printStackTrace();
}