单项选择题

下面程序段的输出结果是______。
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);

A.5

B.6
C.7

D.101
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序段的输出结果为______。 public class Test public static void main(String args[]) booleana, b, C; a=(3<5); b= (a==true); System. out. println( a= +a+ b= +b); c=(b==false); System. out. println ( b= +b+ c= +c);
A.a=true b=false
b=true c=true
B.a=true b=false
b=true c=false
C.a=true b=true
b=true c=false
D.a=false b=false
b=true c=false
单项选择题
下面程序段的输出结果是______。 class Test public static void main (String args[]) MyThread t=new MyThread(); t. displayOutput( t has been createD ); t. start(); Class MyThread extends Thread public void displayOutput(String s) System. out. println(s): ) public void run() displayOutput( t is running. );
A.t has been created.
B.t has been created.
t is running.
C.t is running.
D.编译出错
相关试题
  • 本题的功能是监听对于菜单项和工具条的操作...
  • 本题的功能是用按钮来控制文字的颜色。窗口...
  • 本题的功能是用冒泡法对数组元素arr[]=...
  • 请阅读下列程序代码,然后将程序的执行结果...
  • 在Java语言中,ObjectOutputStream是指__...