1. 程式人生 > >關於JAVA專案中的常用的異常處理情況

關於JAVA專案中的常用的異常處理情況

Exception異常層次結構的根類

RuntimeException許多java.lang異類的基類

ArithmeticException算術錯誤情形

IllegalArgumentException方法接收到非法引數

ArrayIndexOutOfBoundException陣列大小小於或大於實際的陣列大小

NullPointerException嘗試訪問NULL物件成員

ClassNotFoundException不能載入所需的類

NumberFormatException數字轉化格式異常

IOException I/O異常的根類

FileNotFoundException找不到檔案

EOFException檔案結束

InterrupteException執行緒中斷