网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
代码System.out.println(066)的输出结果是( )。
A.12
B.36
C.54
D.66
参考答案
更多 “ 代码System.out.println(066)的输出结果是( )。A.12B.36C.54D.66 ” 相关考题
考题
分析下列代码:ClassA{Publicstaticvoidmain(String[]args){method();}staticvoidmethod(){try{System.out.println(Hello);}finally{System.out.println(good-bye);}}}编译运行后,输出结果是()。
A.HelloB.good-byeC.Hellogod-byeD.代码不能编译
考题
研究下面的Java代码:switch(x){case1:System.out.println(1);case2:case3:System.out.println(3);case4:System.out.println(4);}当x=2时,运行结果是()。
A.没有输出任何结果B.输出结果为3C.输出结果是3和4D.输出结果是1、3和4
考题
对于下列代码,下列哪个叙述是正确的? class A { public int i=0; A(int m) { i = 1; } } public class B extends A { B(int m) { i = 2; } public static void main(String args[]){ B b = new B(100); System.out.println(b.i); //【代码】 } }A.程序提示编译错误。B.编译无错误,【代码】输出结果是0。C.编译无错误,【代码】输出结果是1。D.编译无错误,【代码】输出结果是2。
考题
6.下面代码片断的输出结果是什么? int w = 25, x = 3; boolean y = w < x; boolean z = w >= w * 2 - x * 9; boolean cc = 'b' > 'a'; System.out.println("w<x=" + y); System.out.println("z=" + z); System.out.println("cc=" + cc); 输出结果为:
考题
下面代码片段,当x=2是的运行结果是() switch (x ){ case 1: System.out.println(1); case 2: case 3: System.out.println(3); case 4: System.out.println(4); }A.输出结果为3B.没有输出任何结果C.输出结果是3和4D.3和4
考题
3.对于如下代码,下列哪个叙述是正确的? public class E{ public static void main(String[] args){ String strOne="bird"; String strTwo=strOne; strOne="fly"; System.out.println(strTwo); } }A.程序编译出现错误。B.程序标注的【代码】的输出结果是bird。C.程序标注的【代码】的输出结果是fly。D.程序标注的【代码】的输出结果是null。
热门标签
最新试卷