关于异常,下列说法正确的是
A. 异常是一种对象
B. 一旦程序运行,异常将被创建
C. 为了保证程序运行速度,要尽量避免异常控制以上说法都不对
D. 以上说法都不对
下列程序的执行,说法错误的是class MultiCatch{public static void main(String args[]){try{int a=args.length;int b=42/a;int c[]={1};c[42]=99;System.out.println(“b=”+b);}catch(ArithmeticException e){System.out.println(“除0异常:”+e);}catch(ArrayIndexOutOfBoundsException e){System.out.println(“数组超越边界异常:”+e);}}}
A. 程序将输出第15行的异常信息
B. 程序第10行出错
C. 程序将输出“b=42”
D. 程序将输出第19行的异常信息
下面程序抛出了一个“异常”并捕捉它。请在横线处填入适当内容完成程序。class TrowsDemo{static void procedure() throws IllegalAccessExcepton{System.out.println(“inside procedure”);throw_______IllegalAccessException(“demo”);}public static void main(String args[]){try{procedure();}___________{System.out.println(“捕获:”+e);}}
Partially funded by central government grants, most of the British universities receive their remaining funds from all the following sources EXCEPT ________.
A. tuition fees
B. loans
C. donations
D. corporate contributions