单项选择题

下面程序的正确输出是( )。
public class Hello
public static void main(String args[])
int count, xPos = 25;
for ( count = 1; count <= 10; count++ )

if ( count == 5 )
break;
System.out.println(count );
xPos += 10;

A.1 2 3 4
B.1 3 4
C.编译错误
D.以上都不是
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序的执行结果为( )。 public class c3 public static void main (String args[]) int i=13,j=10; if (i-->j) i++; else j--; System. out.println (i+ t +j);
A.13 10
B.12 11
C.11 11
D.12 12
单项选择题
如下程序的输出结果是( )。 public class Test void printValue(int m) do System.out.println( The value is +m); while(--m > 10 ) public static void main(String args[]) int i=10; Test t= new Test(); t.printValue(i);
A.The value is 8
B.The value is 9
C.The value is 10
D.The value is 11
相关试题
  • 在数据库逻辑结构的设计中,将E-R模型转换...
  • 希望编写好的Java程序代码,应遵守命名规则...
  • 通过参数定制Applet,请在下划线处编写适当...
  • 在传递给实现了java.awt.event.MouseMot...
  • 如果一个Java Applet源程序文件只定义有一...