问九:源码层面解析Thread.sleep()为什么需要抛异常?

结合此篇文章进行阅读:InterruptedExcption详细分析 导入: Thread.sleep()抛的是InterruptedException,这个错误在源码中的注释为: * Thrown when a thread is waiting, sleeping, or  otherwise occupied, * and the thread is interrupted, either
相关文章
相关标签/搜索