This commit is contained in:
CyC2018 2019-06-20 23:41:29 +08:00
commit 72acce764f

View File

@ -229,6 +229,7 @@ main() 属于非守护线程。
public static void main(String[] args) { public static void main(String[] args) {
Thread thread = new Thread(new MyRunnable()); Thread thread = new Thread(new MyRunnable());
thread.setDaemon(true); thread.setDaemon(true);
thread.start();
} }
``` ```