首页 > 计算机等级考试
题目内容 (请给出正确答案)
[主观题]

下列代码段的输出结果为()。public class priority{public static void main(String args[ ]){ in

下列代码段的输出结果为()。 public class priority { public static void main(String args[ ]) { int a=10,b=4,c=20,d=6; System.out.println(a+c%B) ; System.out.println(a++*b+c--D) ; } }

A.10 40

B.10 96

C.80 60

D.96 60

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“下列代码段的输出结果为()。public class pri…”相关的问题
第1题
下面代码段的输出结果为()。public class Test{public static void main(String sss[]){int i=0xF

下面代码段的输出结果为()。 public class Test { public static void main(String sss[]) { int i=0xFFFFFFFl; int j=~i; } }

A.0

B.1

C.14

D.-15

点击查看答案
第2题
下列代码段的执行结果为()。public class BitOperator{public static void main(String args[]){i

下列代码段的执行结果为()。 public class BitOperator { public static void main(String args[ ]) { int a=-67,b=116,c=78,d; d=~c>>2&(a|~B) ; System.out.println ("d="+D) ; } }

A.d=70

B.d=67

C.d=78

D.d=116

点击查看答案
第3题
下列代码执行之后,输出的结果为______。 public class ex34{ public static void main(String[]ar

下列代码执行之后,输出的结果为______。 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

点击查看答案
第4题
下列代码段的执行结果为()。public class BitOperator{public static void main(String args[ ]){

下列代码段的执行结果为()。 public class BitOperator { public static void main(String args[ ]) { int a=-67,b-116,c=78,d; d=~C>>2&(a|~B) ; System.out.println("d="+D) ; } }

A.d=70

B.d=67

C.d=78

D.d=116

点击查看答案
第5题
下列代码执行之后,输出的结果为______。 public class ex38 {public static void main(String[]ar

下列代码执行之后,输出的结果为______。 public class ex38 { public static void main(String[] args) { int x=12; int m=11; int y=13; int temp=x>y?x:y; temp=temp>m?temp:m; System.out.println (temp); } }

A.1

B.12

C.13

D.11

点击查看答案
第6题
执行下列程序段之后,输出的结果为______。public class ex43{ public static void main(String[]a

执行下列程序段之后,输出的结果为______。 public class ex43 { public static void main(String[] args) { short a=127; short b=4; a>>>=--b; System.out.println(a); } }

A.10

B.15

C.30

D.128

点击查看答案
第7题
执行下列代码后输出结果为:public class test {public static void main(String args[]) {int a=2;int b=3;int c=7;int d=a>c?a:c;d=d>>2>b? d:b;System.out.println(b);}}

A.2

B.3

C.5

D.7

点击查看答案
第8题
运行下列代码段,输出结果为True的是()

A.print(5 >= 5)

B.print(5 => 5)

C.print(5 == 5)

D.print(5 <= 5)

点击查看答案
第9题
阅读下列代码段。 class Test implements Runnable{ public int run{ int i=0: while(true){ i+

阅读下列代码段。 class Test implements Runnable{ public int run{ int i=0: while(true){ i++: System.OUt.println("i="+i); } } } 上述代码的编译结果是()。

A.程序通过编译并且run方法可以正常输出递增的i值

B.程序通过编译,调用run方法将不显示任何输出

C.程序不能通过编译,因为while的循环控制条件不能为“true”

D.程序不能通过编译,因为run方法的返回值类型不是void

点击查看答案
第10题
有如下代码段public class OperatorAndExceptions{ public static void main(String args[]) {in

有如下代码段 public class OperatorAndExceptions { public static void main(String args[]) { int i=10,j=15; System.out.println(i==j); String s1=new String("how are you!"); String s2=new String("how are you!"); System.out.println(s1==s2); } } 其输出为()。

A.true false

B.true true

C.false true

D.false false

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改