在idea里面鼠标放在红线上显示
Unhadnled exception:java.lang.InterruptedException
则需要抛出异常或者try-catch,如图
快捷方式 双击选中红色提示 按 Alt+Enter
Add exception to method signature 为抛出异常
Surround with try/catch 为 try-catch
在idea里面鼠标放在红线上显示
Unhadnled exception:java.lang.InterruptedException
则需要抛出异常或者try-catch,如图
快捷方式 双击选中红色提示 按 Alt+Enter
Add exception to method signature 为抛出异常
Surround with try/catch 为 try-catch