black

登录

单项选择题

下列代码的执行结果是()。
public class Test
public static void main(String[] args)
int[] x=0,1,2,3;
for(int i=0;i<3;i+=2)
try
System.out.println(x[i+2]/x[i]+x[i+1]);
catch(ArithmeticException e)
System.out.println("error1");
catch(Exception e)
System.out.println("error2");

A.error1
B.error2
C.error1
error2
D.2
error2

相关考题

单项选择题 在堆栈类SharedStack的定义中,为了保证堆栈在并发操作中数据的正确性,应在下划线处填入的修饰符是()。(两个下划线的填写内容相同) public class SharedStack ______int idx=0; ______char[] data=new char[10]; public synchronized void push(char c) ______ public synchronized void pop()______

单项选择题 下面代码中的内部类名是()。 import java.awt*; import javax.swing.*; class TalkingClock public static void main(int interval,final boolean beep) ActionListener listener=new ActionListener() public void actionPerformed(ActionEvent event) ______ Timer t=new Timer(interval,listener); t.start();

单项选择题 鼠标在窗口中移动时,产生的事件是()。

All Rights Reserved 版权所有©PP题库网库(pptiku.com)

备案号:湘ICP备14005140号-5

经营许可证号:湘B2-20140064