But then the compiler or IDE balks that you haven't dealt with the checked InterruptedException.
但是编译器或IDE报错说没有处理检查到的InterruptedException。
When a blocking method detects interruption and throws InterruptedException, it clears the interrupted status.
当一个阻塞方法检测到中断并抛出InterruptedException时,它清除中断状态。
Since this application has not defined another thread to cause the interrupt, it doesn't bother to catch InterruptedException.
由于这个应用程序并没有定义其他的线程,所以并不用关心如何处理该异常。
应用推荐