网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
intI=1,j=0switch(i){case2:j+=6;case4:j+=1;default:j+=2;case0:j+=4;}Whatisthevalueofjatline16?()

A.0

B.1

C.2

D.4

E.6


参考答案

更多 “ intI=1,j=0switch(i){case2:j+=6;case4:j+=1;default:j+=2;case0:j+=4;}Whatisthevalueofjatline16?() A.0B.1C.2D.4E.6 ” 相关考题
考题 请阅读下面程序public class Test {public static void main (String[] args) {int i,j;for (i=1;i<5;i++) {for (j=1;j<=i;j++)system.out.print (i+"X"+j+"="+i*j+" ");System.out.println();}}}程序执行完后,i循环和j循环执行的次数分别是【 】。

考题 publicclassTest{publicstaticvoidmain(StringArgs[]){inti=1,j=0;switch(i){case2:j+=6;case4:j+=1;default:j+=2;case0:j+=4;}System.out.println(j=”+j);}}Whatistheresult?() A.0B.2C.4D.6E.9F.13

考题 给定程序段,求输出结果。 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);A.6B.1C.2D.4

考题 已知int i=10,j=20,求j+=++i,j=_____

考题 已知int i=6,j=8,求j+=++i,j=_____

考题 【单选题】下面语句执行后,i 的值是()。 for(int i=0, j=1; j < 5; j+=3 ) i=i+j;A.4B.5C.6D.7

考题 62、以下i的运算结果为3的表达式是()A.int i=1,j=1;(i+=2,(j++)+1);B.int i=1,j=0;j=i=((i=3)*2)C.int i=0,j=1;(j==1)?(i=1):(i=3);D.int i=0,j=0;j+=j+=2;

考题 4、给定程序段,求输出结果。 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);A.6B.1C.2D.4

考题 3、给定下面程序段,输出结果是()。 int i= 1, j = 0; switch(i){ case 1 : j += 6; case 2 : j += 1; default : j += 2; } System.out.println(j); A.2 B.6 C.7 D.9