black

Java认证考试综合练习

登录

单项选择题

程序: 
class    TestApp{ 
public  static void main (String[]  args){     
int X=5:     
switch (x){    
case l:     
case 2:     
case 3: 
System. out.println(“一季度”);     
break;     
case 4:     
case 5:
case 6: 
System. out.println(“二季度”);    
break;     
default: 
System. out.println(“三季度以上”);    
break;     }     }     } 
上述程序运行后的结果是哪项?()     

A. 一季度
B.二季度
C.三季度以上
D.无输出

相关考题

单项选择题 已知数组array,其最后一个元素的下标是?()

多项选择题 下列有关数组的声明中,正确的是哪项?()

单项选择题 现有:      class TestApp{  public  static  void main (String[]  args){      int [5]   myarray={ 10, 11, 12, 13, 14);      int sum=0;  for (int x  :  myarray)     sum+=x;  System. out. println( "sum= "+sum);     }     }  上述程序运行后的结果是哪项?()

All Rights Reserved 版权所有©易学考试网(yxkao.com)

备案号:湘ICP备2022003000号-3