奥鹏作业答案 - 分忧网!奥鹏作业答案,奥鹏在线作业答案,奥鹏作业答案及毕业论文分忧

电大作业答案,国开在线作业答案,国开在线考核_分忧网

当前位置: 主页 > 国开形考作业 >

What happens when you try to compile and run the following p

时间:2021-12-31 15:06来源:未知 作者:admin 点击:
(单选题)7: What happens when you try to compile and run the following program? class Mystery{String s; public static void main(String[] args){ Mystery m=new Mystery();m.go();} void Mystery(){s="constructor";} void go(){Syste
(单选题)7: What happens when you try to compile and run the following program? class Mystery{String s; public static void main(String[] args){ Mystery m=new Mystery();m.go();} void Mystery(){s="constructor";} void go(){System.out.println(s);} }
A: this code will not compile
B: this code compliles but throws an exception at runtime
C: this code runs and "constructor" in the standard output
D: this code runs and writes "null" in the standard output
正确答案:♦D♦
(责任编辑:admin)有不懂可以加客服微信:vq800020900 咨询
------分隔线----------------------------
猜您喜欢
栏目导航
推荐内容
热点内容

要做作业扫码我

微信扫码客服

提示信息×