单项选择题

下列程序段执行后,x5的结果是______。 public class ex42 { public static void main(String[] args) { int xl = 8; int x2 = 12; int x3=7; int x4; int x5; x4 = x1 > x2 x1 : x2+ x1; x5 = x4 > x3 x4 : x3; System.out.println(x5); } }

A.11
B.20
C.10
D.12
<上一题 目录 下一题>
热门 试题

单项选择题
下列代码的执行结果是______。 public class ex55 { public static void main(String args[] ) { String s1=new String( hello ); String s2=new String( hello ); System.out.print (s1==s2); System.out.print ( , ); System.out.println (s1.equals (s2)); } }
A.true, false
B.true, true
C.false, true
D.false, false
单项选择题
执行下列程序段之后,变量c的值为______。 public class ex45 { public static void main(String[] args) { int a=5; int b=5; int c=(a++)*(--b); System.out,println(c); } }
A.30
B.20
C.10
D.15
相关试题
  • 数据类型为长整型的保留字是______,...
  • 顺序执行下面的语句后,输出的结果是___...
  • 在Java语言中,如实型常量后没有任何字母,...
  • 设有数组定义: int a[] = {11,...
  • 在Java语言中,用来分配内存的运算符是__...