black

Java认证考试综合练习

登录

单项选择题

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

A.Z=21
B.Z=22
C.Z=23
D.Z= 24

相关考题

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

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

单项选择题 现有:  class Output  {  public static void main (String[]  args)    {      int i=5:  System.out.print( "4"+i+"");      System.out.print (i+5+"7");     System.out.println  (i+"8");      }      }      结果为:()

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

备案号:湘ICP备14005140号-4

经营许可证号:湘B2-20140064