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

3下面程序段的输出结果为()。mblic class Test public static void main(String args[]){boolean

3下面程序段的输出结果为()。 mblic class Test public static void main(String args[]) { boolean a,b,c; a=(3<5); b=(a==true); System.out.println("a="+a+"b="+b); c=(b=false); System.out.println("b="+b+"c="+c); } }

A.a=true b=false b=true c=false

B.a=true b=false b=true c=true

C.a=true b=true b=true c=false

D.a=false b=false b=true c=false

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“3下面程序段的输出结果为()。mblic class Tes…”相关的问题
第1题
下面程序段的输出结果为()。pubUCClassTeS{public static voidmain(StringargS[]){booleaha,b,c;a

下面程序段的输出结果为()。 pubUCClassTeS { public static voidmain(StringargS[]) { booleaha,b,c; a=(3<5); b=(a==tme); System.Out.phntln("a="+a+"b="+b); c=(b==false); SyStem.out.println("b="+b+"C="+c); } }

A.a=tme b=falSe

B.a=true b=false b=true c=false b=true C=tme

C.a=true b=true

D.a=falSe b=false b=true c=falSe b=tme c=falSe

点击查看答案
第2题
3下面程序段的输出结果为()。public class Test{int a, b;Test(){ a=100; b=200;} Test(int x, in

3下面程序段的输出结果为()。public class Test{ int a, b; Test() { a=100; b=200; } Test(int x, int y) { a=x; b=y; } public static void main(String args[]) { Test Obj 1 = new Test(12,45 ); System.out.println("a="+Obja+" b="+Objb); Test Obj2 = new Test(); System.out.println("a="+Obja+" b="+Objb); }}

A.a=100 b=200 a=12 b=45

B.a=12 b=45 a=100 b=200

C.a=12 b=200 a=100 b=45

D.a=100 b=45 a=12 b=200

点击查看答案
第3题
下面程序段的输出结果为Print"10+20="PrintlO+20Print"20+20="PrinflO+20A.10+20=30 20+20=40B.1

下面程序段的输出结果为 Print"10+20=" PrintlO+20 Print"20+20=" PrinflO+20

A.10+20=30 20+20=40

B.10+20= 30 20+20= 40

C.10+20 20+20

D.10+20=30 20+20= 40

点击查看答案
第4题
下面程序段的输出结果为public class MyClass{public static void main(String args[]){String s

下面程序段的输出结果为 public class MyClass { public static void main(String args[]) { String s="Helto! How are you?"; System.out.println(s.lastlndexOf("o",16)); } }

A.16

B.o

C.u

D.17

点击查看答案
第5题
下面程序段的输出结果为()。 A.a=true b=false b=true C=trueB.a=true b=false b=true

下面程序段的输出结果为()。下面程序段的输出结果为()。 A.a=true b=false b=true C=trueB.a=t

A.a=true b=false b=true C=true

B.a=true b=false b=true e=false

C.a=true b=true b=true C=false

D.a=false b=false b=true C=false

点击查看答案
第6题
若score分别赋值为99和77,下面程序段分别输出什么结果?ifscore>=90:print('A')elifsco

若score分别赋值为99和77,下面程序段分别输出什么结果?

ifscore>=90:

print('A')

elifscore>=80:

print('B')

elifscore>=70:

print('C')

elifscore>=60:

print('D')

else:

print('F')

点击查看答案
第7题
下列程序段的输出结果为()。A=0Print A+1A=3A.1B.-1C.3D.0

下列程序段的输出结果为()。 A=0 Print A+1 A=3

A.1

B.-1

C.3

D.0

点击查看答案
第8题
下列程序段的输出结果为()。int x=3,y=2;printf("%d",(x-=y,x*=y+8/5));

A.1

B.7

C.3

D.5

点击查看答案
第9题
下列程序段执行后的输出结果为 int x=3;inty=10; System.out.println(y%x);A.0B.1C.2D.3

下列程序段执行后的输出结果为 int x=3; int y=10; System.out.println(y%x);

A.0

B.1

C.2

D.3

点击查看答案
第10题
下面程序段的输出结果为package test;public class ClassA{int x=20;static int y=6;public stat

下面程序段的输出结果为 package test; public class ClassA { int x=20; static int y=6; public static void main(String args[]) { ClassB b=new ClassB(); b.go(10); System.out.println("x="+b.x); } } class ClassB { int x; void go(int y) { ClassA a=new ClassA(); x=a.y; } }

A.x=10

B.x=20

C.x=6

D.编译不通过

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