java main方法为非守护线程(实时线程)
public static void main(String[] args) throws InterruptedException {
Thread t = Thread.currentThread();
System.out.println("Thread name:"+t.getName());
System.out.println("Thread.isDaemon="+t.isDaemon());;
}
运行结果:
Thread name:main
Thread.isDaemon=false
|
|