执行下列程序时,会产生什么异常 public class Test{ public static void main(String args[]){ int d=101; int b=220; long a=321; System.out.println((a-B)/(a-b-D)); } }A.ArrayIndexOutOfBoundsExceptionB.NumberFormatExceptionC.ArithmeticExceptionD.EOFException

题目

执行下列程序时,会产生什么异常 public class Test{ public static void main(String args[]){ int d=101; int b=220; long a=321; System.out.println((a-B)/(a-b-D)); } }

A.ArrayIndexOutOfBoundsException

B.NumberFormatException

C.ArithmeticException

D.EOFException


相似考题
更多“执行下列程序时,会产生什么异常public class Test{public static void main(String args[]){int ”相关问题
  • 第1题:

    以下标识符哪些是合法的?哪些是Java的关键字? miles, Test, a++, --a, 4#R, $4, #44, apps,class, public, int, x, y, min value, 成绩, radius,最大值max。


    TwoUsers

  • 第2题:

    运行下面程序时,会产生什么异常?() public class X7_1_5 { public static void main(String[] args) { int[] z = {1,2,3,4}; int p = z[4]; int x = 0; int y = 5/x; } }

    A.ArithmeticException

    B.NumberFormatException

    C.ArrayIndexOutOfBoundsException

    D.IOException


    C

  • 第3题:

    28、运行下面程序时,会产生什么异常?() public class X7_1_5 { public static void main(String[] args) { int[] z = {1,2,3,4}; int p = z[4]; int x = 0; int y = p/x; } } ‍

    A.ArithmeticException

    B.ArrayIndexOutOfBoundsException

    C.NumberFormatException

    D.IOException


    ArrayIndexOutOfBoundsException

  • 第4题:

    运行下面程序时,会产生什么异常?() public class X7_1_5 { public static void main(String[] args) { int[] z = {1,2,3,4}; int p = z[4]; int x = 0; int y = p/x; } }

    A.ArithmeticException

    B.ArrayIndexOutOfBoundsException

    C.NumberFormatException

    D.IOException


    C

  • 第5题:

    运行下面程序时,会产生什么异常?() public class X7_1_5 { public static void main(String[] args) { int[] z = {1,2,3,4}; int p = z[4]; int x = 0; int y = 5/x; } }

    A.NumberFormatException

    B.ArrayIndexOutOfBoundsException

    C.IOException

    D.ArithmeticException


    C

  • 第6题:

    下面的程序会抛出什么异常类型? public class Test { public static void main(String[] args) { int[] list = new int[5]; System.out.println(list[5]); } }

    A.ArithmeticException

    B.ArrayIndexOutOfBoundsException

    C.StringIndexOutOfBoundsException

    D.ClassCastException


    E