单项选择题

下面程序段的输出结果是
public class Test
public static void main(String args[])
int a,b;
for(a=1, b=1; a<=100; a++)
if(b>=10)break;
if (b%2==1)
b+=2;
continue;


System.out.println(

A.;
&nb
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序的功能是在监控台上每隔一秒钟显示一个字符串 Hello! ,能够填写在程序中下划线位置,使程序完整并能正确运行的语句是 public class Test implements Runnable public static void main(String args[]) Test t=new Test(); Thread tt=new Thread(t); tt.start(); public void run() for(;;) try ______; catch(______e) System.out.println( Hello );
A.sleep(1000)
InterruptedException
B.sleep(1000)
InterruptedException
C.Thread.sleep(1000)
RuntimeException
D.Thread.sleep(1000)
InterruptedException
单项选择题
下列代码中,将引起一个编译错误的行是 1) public class Test 2) int m,n; 3) public Test() 4) public Test(int
A.m=a;
5
相关试题
  • 下面程序段的输出结果是 class Base int...
  • 下面程序段的输出结果是 public class T...