摘要: 异常03 自定义异常: 自定义异常类只需要继承Exception即可。 package Study01;​public class MyException extends Exception{ //传递数字》10 private int detail;​ public MyException(int 阅读全文
posted @ 2021-07-28 15:45 一颗苹果!! 阅读(32) 评论(0) 推荐(0)
摘要: 异常处理02 关键字:try ,catch,finally,throw,throws package Study01;​public class Demo01 { public static void main(String[] args) { int a=1; int b=0; //假设要捕获多个 阅读全文
posted @ 2021-07-28 15:33 一颗苹果!! 阅读(31) 评论(0) 推荐(0)