1、对一个线程调用2次以上的start()方法会报错。
ChildThread t1 = new ChildThread("thread1");
t1.start();
t1.start();
2、对于已经启动的线程,调用setDaemon会报错
class ChildThread extends Thread
{
@Override
public void run()
{
System.out.println(this.name + "--child thead begin");
setDaemon(false);
}
}