更多"运行下面的程序时,会产生( )。 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. 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. 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[])
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[])
byte b=011;
System.out.prinfin(b);
A. B
B. 11
C. 9
D. 011
[单项选择]阅读下面代码
public class Test
public static void main(String[]args)
System.out.println(2>010:8);
其运行的结果是
A. 2
B. 0
C. 10
D. 8
[单项选择]阅读下面程序
public class Test3
public static void main(String args[])
int x=3, y=4, z=5;
String s="xyz";
System.out.primln(s+x+y+z);
程序运行的结果是
A. xyzl2
B. xyz345
C. xyzxyz
D. 12xyz
[单项选择]阅读下面代码
public class Test2005
public static void main(String args[])
System.out.println(~(Oxa5)&Oxaa);
其运行结果是
A. Oxa5
B. 10
C. Ox50
D. Oxaa
[单项选择]下列代码的执行结果是( )。
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 implements Runnable
public static void main(String[]args)
_______________________________________;
t. start( );
public void mR( )
System. out. println("Hello!");
}
在程序下画线处填入正确选项是
A. Test t=flew Test()
B. Thread t=new Thread();
C. Thread t=new Thread(new Test());
D. Test t=new Thread();
[单项选择]阅读下面程序
public class Test3
public static void main (String args[])
int x=3,y=4,z=5;
String S="xyz";
System.out.printIn(s+x+y+z);
程序运行的结果是______。
A. xyz12
B. xyz345
C. xyzxyz
D. 12xyz
[单项选择]阅读下面程序
public class Test2
public static void main (String args[])
int a=10, b=4, C=20, d=6;
System.out .printIn(a++*b+c*--d);
程序运行的结果是______。
A. 144
B. 160
C. 140
D. 164