3.下面程序段的输出成果为_______。public class NewClass { public static void main(String args[]){ int x,y;x=(int)82.5;y=(int)\'A\';System.out.print("x="+x);System.out.print("\ty="+y);}
}
A.82.5 A
B.82 A
C.82.5 65
D.82 65
答案:-
8.下面程序段的输出成果为_______。class OverMethod{void printMeth(){System.out.println("There is none parameter.");}void printMeth(String t){System.out.println("There is one parameter.");}void printMe
A.There is none parameter.There is one parameter.There are two parameters.
B.There is one parameter.There is none parameter.There are two parameters.
C.It’s good!There is none parameter.There are two parameters.
D.There is none parameter.It’s good!There are tw
答案:-
熊猫奥鹏:20春《Java语言程序设计》作业1
1.下面程序段的输出成果是_______。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(xy)System.out.println("xy");
A.xy
B.x=y
C.xy
D.编译过错
答案:-
2.下列程序段不正确的是_______。
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--;
答案:-
3.下面程序段的输出成果为_______。public class NewClass { public static void main(String args[]){ int x,y;x=(int)82.5;y=(int)\'A\';System.out.print("x="+x);System.out.print("\ty="+y);}
}
A.82.5 A
B.82 A
C.82.5 65
D.82 65
答案:-
4.下列选项中不归于Java中心包的一项是_______。
A.javax.naming
B.javax.rmi
C.javax.sound
D.java.math
答案:-
5.履行下列程序段,请选出正确的答案。public class Test{public static void throwit(){throw new RuntimeException();}public static void main(String args[]){try{System.out.println("你好吗");throwit();System.out.pri
A.不能经过编译
B.输出“你好吗”→RuntimeException反常发作→输出“犯错!”→输出“完毕”
C.输出“你好吗”→RuntimeException反常发作→输出“完毕”
D.输出“你好吗”→输出“完毕”→RuntimeException反常发作
答案:-
6.下面不归于Java句子的根本数据类型的是_______。
A.浮点型
B.整型
C.字符型
D.数组型
答案:-
7.下面程序段的输出成果为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]=10 b[0]=1 a[0]=10 b[0]=1
C.a[0]=1 b[0]=10 a[0]=1 b[0]=10
D.a[0]=10 b[0]=10 a[0]=1 b[0]=1
答案:-
8.下面程序段的输出成果为_______。class OverMethod{void printMeth(){System.out.println("There is none parameter.");}void printMeth(String t){System.out.println("There is one parameter.");}void printMe
A.There is none parameter.There is one parameter.There are two parameters.
B.There is one parameter.There is none parameter.There are two parameters.
C.It’s good!There is none parameter.There are two parameters.
D.There is none parameter.It’s good!There are tw
答案:-
9.假如在编译Java程序时,编译成果陈述说找不到编译的代码,下列哪一项不是常见的过错?
A.没有import相应的包
B.文件名拼写过错
C.未加.java后缀
D.源文件不在当时目录下
答案:-
10.下面程序段的输出成果为_______。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.H\M
B.H\\\115
C.H115
D.无输出
答案:-
需要答案联系QQ:3326650399 微信:cs80188
专业辅导各院校在线、离线考核、形考、终极考核、统考、社会调查报告、毕业论文写作交流等!(非免费)
联系我们:QQ客服:3326650399 439328128 微信客服①:cs80188 微信客服②:cs80189
扫一扫添加我为好友 扫一扫添加我为好友