更多"下列程序段的输出结果为______。 int a=2; s"的相关试题:
[填空题]下列程序段的输出结果为【 】。
int a=2;
switch(a) {
case 2:
System.out.print("Value is 2.");
case 3 :
System.out.println("Value is 3.");
break;
default:
System.out.prinfln("end");
break;
}
[单项选择]以下程序段的输出结果为( )。
int j=2
switch (j)
Case 2:
system.out.print("two."):
Case 2+1:
System.out.println("three.");
break:
default:
System.out.println (“value is”+j):
Break
A. two.three.
B. two
C. three
D. value is 2
[填空题]下列程序段的输出结果为 【8】 。
int a=2;
switch (a) {
case 2:
System. out. print( "Value is 2.");
case 3 :
System. out. println( "Value is 3. ");
break;
default:
System. out. println ("end ");
break;
}
[填空题]下列程序段的输出结果为______。
int a=2;
switch(A)
case 2:
System.out.println("Value is 2.");
case 3:
System.out.println("Value is 3.");
break;
default:
System.out.println("end");
break;
[填空题]下列程序段的输出结果为 【8】 。
int a=2;
switch (a)
case 2:
System. out. print( "Value is 2.");
case 3 :
System. out. println( "Value is 3. ");
break;
default:
System. out. println ("end ");
break;
[填空题]下列程序段的输出结果为 ______。
int a=2;
switch (a)
case 2:
System.out.print("Value is 2.");
case 3:
System.out.println("Value is.");
break;
default:
System.out.println("end");
break;
[填空题]
下列程序段的输出结果为()。
int a=2;
switch(a)
case 2:
System.out.print("Value is 2.");
case 3:
System.out.println("Value is 3.");
break;
default:
System.out.prinfln("end");
break;
[填空题]下列程序段的输出结果是 【10】 。
int n=’c’;
switch(n++)
{default:printf("error");break;
case ’a’:
case ’A’:
case ’b’:
case ’B’:printf("good");break;
case ’c’:case’C’:printf("pass");
case ’d’:case’D’:printf("warn");
}
[填空题]下列程序段的输出结果是 【8】 。
int n=’c’;
switch(n++)
{ default:printf("error");break;
case ’a’:case ’A’:case ’b’:case ’B’:printf("good");break;
case ’c’:case ’C’:printf("pass");
case ’d’:case ’D’:printf("warn");
}
[填空题]下列程序段的输出结果为______。
int a=2;
switch(a)
case 2: System.out.println("Value is 2.");
case 3: System.out.println("Value is 3."); break;
default: System.out.println("end"); break;
[填空题]下列程序段的输出结果是 【8】 。
int n=’c’;
switch(n++)
default:printf("error");break;
case ’a’:case ’A’:case ’b’:case ’B’:printf("good");break;
case ’c’:case ’C’:printf("pass");
case ’d’:case ’D’:printf("warn");