标签:++ inf 图片 处理机 bubuko system pre com 学习
public class ExceptionDemo2 { public static void main(String[] args) { // TODO Auto-generated method stub int i=0; int a[]={1,2,3,4}; for( i = 0; i<5; i++) { try { System.out.print("a[" + i + "]/"+ "=" + (a[i]/i)); } catch(ArrayIndexOutOfBoundsException e) { System.out.print("捕获数组下标越界"); } catch(ArithmeticException e) { System.out.print("捕获算术异常"); } finally { System.out.print("finally i=" + i); } System.out.println("继续!"); } } }
标签:++ inf 图片 处理机 bubuko system pre com 学习
原文地址:https://www.cnblogs.com/caiyishuai/p/9947055.html