单项选择题

下列代码执行之后,输出的结果为______。 public class ex34 { public static void main(String[] args) { byte a=-128; byte b=(a|127)>0(byte)(~a>>128:(byte)(~a<<128); System. out. Println(b); } }

A.-128
B.128
C.127
D.-127
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序段执行后,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
相关试题
  • 数据类型为长整型的保留字是______,...
  • 顺序执行下面的语句后,输出的结果是___...
  • 在Java语言中,如实型常量后没有任何字母,...
  • 设有数组定义: int a[] = {11,...
  • 在Java语言中,用来分配内存的运算符是__...