1.異常的結構
Throwable:
Error:
Exception:
IOException:網絡錯誤、磁盤空間不足等
RuntimeException:類型轉換錯誤、數組訪問越界等
2.其中,Error 和RuntimeException爲Unchecked異常。IOException爲Checked異常
3.異常的構造器(繼承自Throwable):Throwable(),Throwable(String message)
4.異常檢查會消耗資源,因此不要濫用異常
5.try...catch...結構中,可使用如下方式拋出異常
6.tyr{try...catch...finally...}catch...結構中,若內層try中發生異常並被catch處理隨後拋出,隨後執行finally中發生異常,將丟失內層所catch的異常