举一反三
- Java程序运行时会自动检查数组的下标是否越界,如果越界会抛出 ArrayIndexOutOfBoundsException 异常。
- 下列属于未受检(unchecked exception)异常的是( )。
- 青书学堂: 下列属于非受检异常的是哪项?
- Java语言中异常的分类是() A: 运行时异常和异常 B: 受检异常和非受检异常 C: 错误和异常 D: 错误和运行时异常
- 下面的异常()为文件没有找到异常。 A: FileNotFoundException B: NullPointerException C: IOException D: ArrayIndexOutOfBoundsException
内容
- 0
不属于RuntimeException异常的是() A: ArithmeticException B: NullPointerException C: ArrayIndexOutOfBoundsException D: EOFException
- 1
Java语言中异常的分类是哪项?Java语言中异常的分类是哪项()。 A: 运行时异常和异常。 B: 受检异常和非受检异常。 C: 错误和异常。 D: 错误和运行时异常。
- 2
运行下面的程序时,会产生( )。 public class Test{ public static void main(String args[ ] ) { int x =0; int y = 2/x; int z[ ] = {1,2,4,6}; int p=z[4]; } } A: ArrayIndexOutOfBoundsExcePtion异常 B: NumberFormatException异常 C: ArithmeticException异常 D: ArithmeticException异常和ArrayIndexOutOfBoundsExcePtion异常
- 3
算术异常类是下面哪一个()。 A: NullPointerException B: ClassCastException C: ArithmeticException D: ArrayIndexOutOfBoundsException
- 4
在下列常见的系统定义异常中,哪个是算术异常?( ) A: IOException B: ArithmeticException C: ArrayIndexOutOfBoundsException D: InputMismatchException