试题 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.
查看答案
答案
试题 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--
查看答案
答案
试题 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.不能通过编译
查看答案
答案