在IDEA里面按住alt+insert可以快速生成 try-catch或者 throws 异常
如下:
IDEA选中代码生成try-catch块
但是如果你遇到的是下面这样的代码,alt+insert就显得有点繁琐了
IDEA选中代码生成try-catch块
使用ctrl+alt+t 快速将选中的代码生成指定的代码块!
IDEA选中代码生成try-catch块

相关文章: