black

SCJP程序员认证考试

登录

单项选择题

public class Test { 
public static void main(String Args[]) { 
int i =1, j = 0; 
switch(i) { 
case 2: j +=6; 
case 4: j +=1; 
default: j +=2; 
case 0: j +=4; 
} 
System.out.println(“j =” +j); 
} 
} 
What is the result? () 

A. 0
B. 2
C. 4
D. 6
E. 9
F. 13

相关考题

多项选择题 int i = 0, j = 5;  tp;   for (;;) {  i++;  for(;;) {  if (i> --j) {  break tp;  break tp;  }  }  System.out.println(“i=” +i “,j =”+j); } What is the result?()

单项选择题 public void foo( boolean a, boolean b ){  if( a ) {  System.out.println( “A” );  } else if ( a && b ) {  System.out.println( “A&&B” );  } else { 17. if ( !b ) {  System.out.println( “notB” );  } else {  System.out.println( “ELSE” );  }  } }  What is correct?()

单项选择题 public class Foo {  public void main( String[] args ) {  System.out.println( “Hello” + args[0] );  }  }   What is the result if this code is executed with the command line?()

All Rights Reserved 版权所有©财会考试题库(ckkao.com)

备案号:湘ICP备2022003000号-2