IDEA 代碼拋異常快捷方式

在碼代碼的過程當中,須要咱們對異常進行處理,如圖所示:spa 快捷方式一(光標移到該代碼行,Alt+Enter),能夠異常外拋出,也能夠try-catch:3d 選擇Add Exception to method signature:blog 選擇Surround with try/catch: it 快捷方式二(光標移到該代碼行,或者選中該行代碼,Ctrl+Alt+T):io
相關文章
相關標籤/搜索