black

Java认证考试综合练习

登录

单项选择题

现有: 
class Foo  { 
public static void main (String  []  args)  {     
int x=O;     
int y=4; 
for (int  z=0;  z<3;  Z++;  X++)  {    
if(x>1&++y<10)   
y++;   
} 
System. out .println (y); 
}  
} 
结果是什么?()     

A.7
B.8
C.10
D.12

相关考题

单项选择题 现有:  class Test2  f  public static void main (String  []  args)  {      boolean X= true;      boolean y=false;      short Z=20;      if((x==true)  &&&ensp; (y=true))  z++;     if((y==true) ||  (++z==22))  z++;      System. out .println( "z="+z);      }      结果是什么?()

单项选择题 现有:  class WhileTests  {  public  static void main (String  []  args)  {      int X=5;  while (++x<4)  {      --x;     }  System.out.println( "x="+x);      }      } 结果是什么?()

单项选择题 以下哪种初始化数组的方式是错误的?()

All Rights Reserved 版权所有©计算机考试题库(jsjtiku.com)

备案号:湘ICP备14005140号-4

经营许可证号:湘B2-20140064