異常的捕獲及處理

1. 異常的產生 異常是導致程序中斷執行的一種指令流,異常一旦出現且沒有對其進行合理的處理,程序就中斷執行。 範例:不產生異常的代碼 public class ExceptionDemo { public static void main(String[] args) { System.out.println("1.開始除法計算"); System.out.
相關文章
相關標籤/搜索