IDEA 代码抛异常快捷方式

转载:https://blog.csdn.net/qq_32040767/article/details/77109738
在码代码的过程中,需要我们对异常进行处理,如图所示:

快捷方式一(光标移到该代码行,Alt+Enter),可以异常外抛出,也可以try-catch:

选择Add Exception to method signature:

选择Surround with try/catch:

快捷方式二(光标移到该代码行,或者选中该行代码,Ctrl+Alt+T):

扫描二维码关注公众号,回复: 5663556 查看本文章

猜你喜欢

转载自blog.csdn.net/Quantum_Dog/article/details/88745579
今日推荐