沒有Exception這個父類異常類型嗎?
如圖,編寫代碼時(shí)報(bào)錯No exception of type Exception can be thrown; an exception type must be a subclass of Throwable,說明沒有Exception類型的父類異常,但是視頻里面這么寫并沒有報(bào)錯,因?yàn)镴DK的版本不同的原因嗎?該怎么解決?
如圖,編寫代碼時(shí)報(bào)錯No exception of type Exception can be thrown; an exception type must be a subclass of Throwable,說明沒有Exception類型的父類異常,但是視頻里面這么寫并沒有報(bào)錯,因?yàn)镴DK的版本不同的原因嗎?該怎么解決?
2018-08-14
舉報(bào)
2019-01-21
版本問題吧,或者JDK,我的是最新的,不用手動導(dǎo)入這個異常。
2018-08-24
我的也是這樣 想知道怎么才能解決