- 2022-10-13自定义的异常类oppdemo12
//自定义的异常类publicclassMyExceptionextendsException{//双击shift:搜索//传递数字>10privateintdetail;publicMyException(inta){this.d
- 2022-10-13异常oppdemo12
publicclassTest1{publicstaticvoidmain(String[]args){inta=2;intb=0;//选择该代码(sout)后Ctrl+Alt+T即可选择代码块
- 2022-10-13(抛出)异常oppdemo12
importjava.sql.SQLOutput;publicclassTest{publicstaticvoidmain(String[]args){//方法中处理的了异常,newTest().test(1,0);一行代码就够了