摘要: 自定义异常 package com.study.exception; //自定义的异常类 public class text3 extends Exception{ //传递数字>10 private int detail; public text3( int a) { this.detail = 阅读全文
posted @ 2021-05-08 16:57 --正函数-- 阅读(54) 评论(0) 推荐(0)
摘要: 捕获和抛出异常: try ,catch ,finally ,throw ,throws //假设要捕获多个异常:从小到大 (Exception,Error) ,Throwable /* try{ //try监控区域 System.out.println(a/b); }catch (Exception 阅读全文
posted @ 2021-05-08 16:01 --正函数-- 阅读(115) 评论(0) 推荐(0)