题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-24 04:47:53

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

更多"运行下面的程序时,会产生( )。 public class Te"的相关试题:

[单项选择]执行下列程序时,会产生什么异常
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. ArithmeticException
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. EOFExcepfion
[单项选择]下面程序片段的运行结果是( )。
public class Test
public static void main (String args[])
int a=10,b=4,c=20,d=6;
System.out.println (a++ *b+c* --d);


A. 144
B. 160
C. 140
D. 164
[单项选择]执行下列程序时,会产生什么异常______。
public class Test
public static void main (String args[])
int d=101;
int b=220;
long a=321;
System.out .printIn((a-b)/(a-b-d));


A. ArrayIndexOutOfBoundsException
B. NumberFormatException
C. ArithmeticException
D. EOFException
[单项选择]在执行下面这段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[])
for(int i=0; i<3;i++)
if(i<2)
continue;
System.out.println(i);



A. 0
B. 1
C. 2
D. 3
[单项选择]下面代码的运行结果是 public class Test{ public static void main(String args[]){ for(int i=0; i<3;i++){ if(i<2) continue; System.out.println(i); } } }
A. 0
B. 1
C. 2
D. 3
[单项选择]阅读下列代码 public class Test 2005{ public static void main(String args[]){ System.out.println((3>2)4:5); } } 其运行结果是【 】
A. 2
B. 3
C. 4
D. 5

我来回答:

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

订单号:

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