A.无结果输出
B.输出null
C.输出hello
D.编译失败
第2题
A.构造
B.static构造
C.static
D.没有输出结果
第3题
请阅读下面的程序
classTest/{
privatestaticStringname;
static/{
name="World";
System.out.print(name);
/}
publicstaticvoidmain(String[]args)/{
System.out.print("Hello");
Testtest=newTest();
/}
/}
下列选项中,程序运行结果是()。
:A.World
B.Hello
C.World Hello
D.Hello World
第4题
阅读下列的程序
publicclassTest3{undefined
publicstaticvoidmain(String[]args){undefined
}
}
classOuter{undefined
staticclassInner{undefined
publicvoidmethod(){undefined
System.out.println(“method”);
}
}
}
下列选项中,可以正确输出method()方法的是()
A、Outero=newOuter();
o.method();
B、InnerI=newInner();
i.method();
C、Outer.Inneroi=newOuter.Inner();
C、oi.method();
D、以上答案都不对
第8题
A.编译通过,执行报错
B.编译报错
C.以上选项均不正确
D.编译通过,执行输出127
第9题
A.输出:构造
B.输出:static构造
C.输出:static
D.没有输出结果
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!