下面程序段的运行结果是() int a=3; switch(a) { case 1: printf("one "); case 2: printf("two "); case 3: printf("three "); case 4: printf("four "); case 5:printf("five "); }
A、one
B、two
C、three
D、three four five
A、one
B、two
C、three
D、three four five
A、Three
B、Over
C、Three Over
D、One Two Three Over
public void test()
{
try
{
oneMethod();
System.out.println("condition 1");
}
catch (ArrayIn(JexOutOfBoundsException e) {
System.out.println("condition 2");
}
catch(Exception e) {
System.out.println("condition 3");
}
finally {
System.out.printIn("finally");
}
}
在oneMethod()方法运行正常的情况下将显示______。
A.Condition 1 B.condition 2
C.condition 3 D.finally
class Parent{
String one,two;
public Parent(String a,String b){
one=a;
two=b;
}
public void print(){System.out.println(one);}
}
public class Child extends Parent{
public Child(String a,String b){
super(a,b);
}
public void print(){
System.out.println(one+"to"+two);
}
public static void main(String arg[]){
Parent P=new Parent("south","north");
Parent t=new Child("east","west");
P.print();
t.print();
}
}
下面的运行结果中正确的是______。
A.在编译时出错
B.south
east
C.south to north
east to west
D.south to north
east
E.south
east to west
A、*
B、%
C、*#
D、%#
A、no
B、four
C、five
D、no four five
A、34
B、4
C、35
D、3
A、a=2,b=1
B、a=1,b=1
C、a=1,b=0
D、a=2,b=2
A、a=10 b=50 c=10
B、a=10 b=30 c=10
C、a=50 b=30 c=10
D、a=50 b=30 c=50
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!