摘要: 转自https://blog.csdn.net/qq_36791569/article/details/78186428 五彩世界 Java的异常: Throwable(所有error和exception的父类:超类) Java将错误变成对象交给异常处理机制 Error(仅靠程序本身无法恢复的严重错 阅读全文
posted @ 2020-11-02 21:35 陈涵 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 1. public class CatchWho { public static void main(String[] args) { try { try { throw new ArrayIndexOutOfBoundsException(); } catch(ArrayIndexOutOfBou 阅读全文
posted @ 2020-11-02 21:01 陈涵 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 1 import javax.swing.*; class AboutException { public static void main(String[] a) { int i=1, j=0, k; k=i/j; try { k = i/j; // Causes division-by-zero 阅读全文
posted @ 2020-11-02 20:16 陈涵 阅读(76) 评论(0) 推荐(0) 编辑