题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-18 22:41:06

[单项选择]执行下列程序时,会产生( )异常。 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. ArraylndexOutOfBoundsException
B. NumberFormatException
C. ArithmeticException
D. EOFExcepfion

更多"执行下列程序时,会产生( )异常。 public class T"的相关试题:

[单项选择]执行下列程序时,会产生什么异常
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 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 static void main(String args[]{ int d=101; int b=220; long a=321; System.out.println((a-b) /(a-b-d) ); } }
A. ArraylndexOutOfBoundsException
B. NumberFormatException
C. ArithmeticExCeption
D. EOFException
[单项选择]运行下面的程序时,会产生( )。 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异常
[单项选择]在执行下面这段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. null
B. test
C. one
D. java
[单项选择]下列代码的执行结果是( )。
public class Test

public static void main(String args[ ])

System. out. println (5/2);
System. out. println (100%3.0);

A. 2和1
B. 2和1.0
C. 2.5和1
D. 2.5和1.0
[单项选择]下列代码的执行结果是   public class Test{    public int aMethod( ) {      static int i=0;      i+ +;      System.out.println(i);    }     public static void main(String args[ ]){      Test test = new Test( );      test.aMethod( );    }  }
A. 编译错误
B. 0
C. 1
D. 运行成功,但不输出
[单项选择]下列代码段执行结果为( )。
public class Test

public static void main(String args[ ])

System.out.println("abc"+3+4+5);
System.out.println(3+4+5+"abc");


A. 编译出错
B. abc345和abc345
C. abc和12
D. abc345和12abc
[单项选择]下列代码的执行结果是( )。
public class Test
public static void main (String args[ ])
System.out.println(5/2):


A. 2.50
B. 2
C. 2.5
D. 2.0
[单项选择]下列代码的执行结果是( )。
public class Test
public static void main(String args[ ])
float t=9.0f;
int q=5;
System.out.println((t++) * (- -q));


A. 41
B. 41.0
C. 36
D. 36.0
[单项选择]下列程序的执行结果是( )。
public class Test

public static void main(String args[])

System.out.println(5/2);


A. 2.5
B. 2.0
C. 2.50
D. 2
[单项选择]下列程序的执行结果是( )。
public class Test

public static void main(String args[])

byte y=4;
long r=80L;
System.out.println(r/y);


A. 20B
B. 20
C. 20.0
D. 编译错误
[单项选择]下列代码的执行结果是public class Test{ public int aMethod( ){ static int i=0; i++; System.out.println(i); } public static void main(String args[]){ Test test= new Test( ); test. aMethod( ); }}
A. 编译错误
B. 0
C. 1
D. 运行成功,但不输出

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码