java基礎之------異常捕獲

可查異常 必須進行處理,否則編譯器不讓通過編譯 處理方式:向外拋出throws或者try{}catch{} 例子:FileNotFoundException 運行時異常(RuntimeException) 不是必須進行try{}catch{} 例子: 除數不能爲0:ArithmeticException 下標越界異常:ArrayIndexOutOfBoundsException 空指針異常:Nul
相關文章
相關標籤/搜索