下面的程序片断中 try 子句包含了可能产生 ArrayIndexOutOfBoundsException 类型 的异常的语句序列,补充程序完成实现捕获并处理这类异常对象。 public class Test1 { public static void main(String[] args) { int a[]=new int[8], b; try{ for(int i=0;i<10;i++){ System.out.println(a[i]); } } { System.out.println(" 数组越界 "+e.getMessage()); } } }