大学作业 > 北京语言大学 >计算机科学与技术 > 北京语言大学20春《Java语言程序设计》作业1答案

北京语言大学20春《Java语言程序设计》作业1答案

2022-12-12 有效期:购买后365天内有效
收藏
¥5.00 购买本套试卷答案 查看试卷 联系客服
您的账号:,可能还需要:
重要提示:请勿将账号共享给其他人使用,违者账号将被封禁。
北京语言大学20春《Java语言程序设计》作业1答案试卷(10)
试题 1
[单选题] 下面不属于Java语句的基本数据类型的是_______。
[单选题] 下面不属于Java语句的基本数据类型的是_______。

A.浮点型

B.整型

C.数组型

D.字符型

查看答案
答案
试题 2
[单选题] 下面程序段的输出结果为_______。public class Test { public static void main(String args
[单选题] 下面程序段的输出结果为_______。public class Test { public static void main(String args
[]){ char c1,c2,c3; c1='H'; c2='\\'; c3='\115'; System.out.print(c1); System.out.print(c2); System.out.print(c3);
A.无输出
B.H\\\115
C.H\M
D.H115
查看答案
答案
试题 3
[单选题] 下面程序段的输出结果为_______。public class NewClass { public static void main(String a
[单选题] 下面程序段的输出结果为_______。public class NewClass { public static void main(String a
rgs[]){ int x,y; x=(int)82.5; y=(int)'A'; System.out.print("x="+x); System.out.print("\ty="+y); } }
A.82 A
B.82 65
C.82.5 A
D.82.5 65
查看答案
答案
试题 4
[单选题] 下面程序段的输出结果为_______。class OverMethod{ void printMeth(){ System.out.println(&
[单选题] 下面程序段的输出结果为_______。class OverMethod{ void printMeth(){ System.out.println(&
quot;There is none parameter."); } void printMeth(String t){ System.out.println("There is one parameter."); } void printMe
A.There is one parameter.There is none parameter.There are two parameters.
B.There is none parameter.There is one parameter.There are two parameters.
C.There is none parameter.It’s good!There are tw
D.It’s good!There is none parameter.There are two parameters.
查看答案
答案
试题 5
[单选题] 下面程序段的输出结果是_______。public class Test{ public static void main(String args[]
[单选题] 下面程序段的输出结果是_______。public class Test{ public static void main(String args[]
){ int x,y; x=(int)Math.sqrt(5)/2+(int)Math.random()*5/2; y=(int)Math.sqrt(3)/2+(int)Math.random()*3/2; if(x>y) System.out.println("x>y");
A.编译错误
B.x>y
C.x=y
D.x
查看答案
答案
试题 6
[单选题] 下面程序段的输出结果为public class Test { public static void main(String args[]){ int
[单选题] 下面程序段的输出结果为public class Test { public static void main(String args[]){ int
a[]={1,2,3},b[]=new int [3]; System.arraycopy(a, 0, b, 0, 3); System.out.println("a[0]="+a[0]+" b[0]="+b[0]); a[0]=10; System.out.println("a
A.a[0]=1 b[0]=1 a[0]=10 b[0]=1
B.a[0]=1 b[0]=10 a[0]=1 b[0]=10
C.a[0]=10 b[0]=1 a[0]=10 b[0]=1
D.a[0]=10 b[0]=10 a[0]=1 b[0]=1
查看答案
答案
试题 7
[单选题] 下列程序段不正确的是()。
[单选题] 下列程序段不正确的是()。
A.String A=“firstJava”;A-=“Java”
B.String A=“firstJava”;A+=“Java”
C.Integer J=new Integer(27);J-=7
D.Integer J=new Integer(27);J--
查看答案
答案
试题 8
[单选题] 下列选项中不属于Java核心包的一项是_______。
[单选题] 下列选项中不属于Java核心包的一项是_______。

A.javax.sound

B.javax.rmi

C.javax.naming

D.java.math

查看答案
答案
试题 9
[单选题] 如果在编译Java程序时,编译结果报告说找不到编译的代码,下列哪一项不是常见的错误?
[单选题] 如果在编译Java程序时,编译结果报告说找不到编译的代码,下列哪一项不是常见的错误?

A.源文件不在当前目录下

B.没有import相应的包

C.未加.java后缀

D.文件名拼写错误

查看答案
答案
试题 10
[单选题] 执行下列程序段,请选出正确的答案。public class Test{ public static void throwit(){ throw n
[单选题] 执行下列程序段,请选出正确的答案。public class Test{ public static void throwit(){ throw n
ew RuntimeException(); } public static void main(String args[]){ try{ System.out.println("你好吗"); throwit(); System.out.pri
A.输出“你好吗”→输出“结束”→RuntimeException异常发生
B.输出“你好吗”→RuntimeException异常发生→输出“结束”
C.输出“你好吗”→RuntimeException异常发生→输出“出错!”→输出“结束”
D.不能通过编译
查看答案
答案
快速选题
¥5.00 购买本套试卷答案
重置密码
确认修改