单项选择题
有如下程序 public class Sun { public static void main (String args[ ]) { int a=2, b=1, c=2; if (a<B) if (b<0) if (c<0) c=0; else c++; System. out.println(C) ; } } 上述程序的运行结果是( )。
A.0
B.1
C.2
D.3
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下面程序的输出结果是( )。 public class Sun { public static void main(String args[ ]) { int[] a=new int[11]; int[] p=new int[4]; int k=5; for (int i=1; i<=10; i++) a[i]=i; for(int i=1;i<=3;i++) p[i]=a[i*i]; for (int i=1; i<=3;i++) k=k+p [i]*2; System.out.println (k); } }
A.33
B.28
C.35
D.37
点击查看答案&解析
单项选择题
有如下程序 public class Sun { public static void main (String args[ ]) { int x=0; int n=0; while (x<50) { x=(x+2)*(x+3); n=n+1; System.out.println (n+ 和 +x); 上述程序的运行结果是( )。
A.1和0
B.2和72
C.3和50
D.4和168
点击查看答案&解析
相关试题
一个类的定义分为类注释、 【13】 和类...
Applet生命周期包括卸plet的创建、运行和 ...
下列Applet当鼠标进入窗口时,在状态栏显示...
MouscEvcnL事件可以实现的监听接口是MouseL...
下面的应用程序中有一个组,组内有4个单选...