Thread常用方法 注意一下这个方法sleep(millitime) 直接调用sleep方法会报错,因为本身抛了一个异常,我们需要处理。此处不能通过throws抛异常,因为必须在run()方法下throws,但是run是重写的thread类的run()方法,原方法并没有throws。 所以此方法只能try-catch 而不能使用throws 其他方法 相关文章: 2021-11-27 2021-10-25 2021-08-18 2021-12-16 2022-02-07