2021
03-02
03-02
Java异常处理实例详解
1.异常例子classTestTryCatch{publicstaticvoidmain(String[]args){intarr[]=newint[5];arr[7]=10;System.out.println("end!!!");}}输出:(越界)Exceptioninthread"main"java.lang.ArrayIndexOutOfBoundsException:7atTestTryCatch.main(TestTryCatch.java:4)进程已结束,退出代码12.异常处理classTestTryCatch{publicstaticvoidmain(String[]args){try{intarr[]=new...
继续阅读 >