为什么有时候用thread对象,有时候直接用Thread
来源:5-14 interrupt状态

慕的地0234161
2020-05-15
为什么有时候用thread对象,有时候直接用Thread,在启动和中断时用的thread对象,在休眠时用的Thread,不太理解 thread.start(); Thread.sleep(1000); thread.interrupt();
写回答
1回答
-
悟空
2020-05-15
静态方法调用时不指定实例,sleep是静态方法
122020-07-09
相似问题