[单选题]

执行下列程序时,会产生什么异常 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.ArithmetieException

D.EOFException

参考答案与解析:

相关试题

执行下列程序时,会产生什么异常public class Test{public

[单选题]执行下列程序时,会产生什么异常 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

    [单选题]执行下列程序时,会产生什么异常 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.ArraylndexOutOfBoundsExceptionB.NumberFormatExceptionC.ArithmeticExCeptionD.EOFException

  • 查看答案
  • 执行下列程序时,会产生( )异常。 public class Test{publ

    [单选题]执行下列程序时,会产生( )异常。 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.ArraylndexOutOfBoundsExceptionB.NumberFormatExceptionC.ArithmeticExceptionD.EOFExcepfion

  • 查看答案
  • 运行下面的程序时,会产生( )。 public class Test{publi

    [单选题]运行下面的程序时,会产生( )。 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异常和Array

  • 查看答案
  • 运行下面的程序时,会产生()。 public class Test{public

    [单选题]运行下面的程序时,会产生( )。 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异常和Array

  • 查看答案
  • 执行下列程序时,会产生什么异常()。publicclassTest{public

    [单选题]执行下列程序时,会产生什么异常( )。 publicclassTest{ publicstaticvoidmain(Stringargs[]){ intd=101; intb=220; longa=321; System.out.println((a-b)/(a-b-d)); } }A.ArraylndexOutOfBoundsExceptionB.NumberFormatExceptionC.AriUiinedcExcepdOnD.EOFExCtion

  • 查看答案
  • 执行下列程序后,输出结果为()。public class Test {publi

    [单选题]执行下列程序后,输出结果为( )。 public class Test { public static void main (String[] args) { StringBuffer sb = new StringBuffer("北京 2008" ); System. out. println ("length =" + sb. length ( ) ); } }A.length = 8B.length = 10C.length = 6D.length = 20

  • 查看答案
  • 在执行下面这段Java程序时:public class Test {public

    [单选题]在执行下面这段Java程序时: public class Test { public static void main (String[] args) { String s1=args[0]; String s2=args[1]; String s3=args[2]; } }若编译程序后键入命令: java Test one two three,那么变量s1所引用的字符串为( )。A.nullB.testC.oneD.java

  • 查看答案
  • 下列代码的执行结果是()。 public class Test 2{ publi

    [单选题]下列代码的执行结果是( )。 public class Test 2{ public static void main (String arg[]){ System.out.println(100%3); System.out.println(100%3.0); } }A.1和1B.1和1.0C.1.0和1D.1.0和1.0

  • 查看答案
  • 下列代码的执行结果是( )。 public class test4{ publi

    [单选题]下列代码的执行结果是( )。 public class test4{ public smile void main(string args[]){ int a=4,b=6,c=8; String s="abc"; Sy stem.out.println(a+b+s+e); System.out.pfinfin(); } }A.ababccB.464688C.46abc8D.10abc8

  • 查看答案
  • 执行下列程序时,会产生什么异常 public class Test {publi