给定一段java代码:
class SampleExpcetion {
public static void main(String args[]){
try {
int a[]= new int[15];
a[5]= 30/0;
}
catch(Exception e) {System.out.println("task completed");}
catch(ArithmeticException e) {System.out.println("task1 completed");}
catch(ArrayIndexOutOfBoundsException e) { System.out.println("task2 completed");}
System.out.println("Rest of the code......");
}
}
为什么这段代码会给出编译时错误?