网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
( 12 )代码 System.out.println(066) 的输出结果是 【 12 】 。
参考答案
更多 “ ( 12 )代码 System.out.println(066) 的输出结果是 【 12 】 。 ” 相关考题
考题
分析下列代码:ClassA{Publicstaticvoidmain(String[]args){method();}staticvoidmethod(){try{System.out.println(Hello);}finally{System.out.println(good-bye);}}}编译运行后,输出结果是()。
A.HelloB.good-byeC.Hellogod-byeD.代码不能编译
考题
分析下列java代码ClassA{Publicstaticvoidmain(String[]args){Method();}Staticvoidmethod(){try{System.out.println(hello”)}finally{System.out.println(good-bye”);}}}编译运行后,输出结果是()
A.“hello”B.“good-bye”C.“hello”“good-bye”D.代码不能编译
考题
研究下面的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
考题
阅读下列代码Public class Person{Static int arr[ ] = new int (10);Public static void main (String args ) {System.out.println(arr[9]);}}该代码运行的结果是A )编译时将产生错误B )编译时正确,运行时将产生错误C )输出 0D )输出空
考题
classMyApp{publicstaticvoidmain(String[]args){intage;System.out.println(age=”+age);}}执行上述代码后输出的结果是哪项?()
A.age=0B.age=nullC.age=D.程序编译错误
考题
阅读下面代码 public class Arrays { public static void main(String[] args) { int[] a=new int[5]; for(int i=0;i<a.length;i=i+1)a[i]=10+i; for(int i=0;i<a.length;i=i+1)System.out.println(a[i]); String[] s={"Frank","Bob","Jim"}; for(int i=0;i<s.length;i=i+1)System.out.println(s[i]); s[2]="Mike"; System.out.println(s[2]); } } 代码运行正确的结果是A.10 11 12 13 14 Mike Bob Frank JimB.11 12 13 14 15 Frank Bob Mike JimC.10 11 12 13 14 Frank Bob Jim MikeD.11 12 13 14 15 Mike Jim Bob Frank
考题
阅读下列代码 publicclassPerson{ staticintalt[]=newint[[10]; public static voidmain(Stringargs){ System.out.println{all[9]); } } 该代码的运行结果是( )。A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空
考题
下列代码的执行结果是( )。 int length="Hell0".length; System.OUt.println(length); A.5S
下列代码的执行结果是( )。 int length="Hell0".length; System.OUt.println(length);A.5B.2C.10D.6
考题
下面程序段的输出结果是( )。 public class Test{ public static void main(String args[]){ int i=1: switch(i){ case0: System.OUt.println("0"); break; casel: System.out.println("1"); case2: System.OUt.println("2"); break; default: System.out.println("default"); } } }A.01B.12C.10D.21
考题
下列代码执行之后,输出的结果为______。 public class ex38 { public static void main(String[] args) { int x=12; int m=11; int y=13; int temp=x>y?x:y; temp=temp>m?temp:m; System.out.println (temp); } }A.1B.12C.13D.11
考题
执行如下语句之后,输出的结果是______。 public class ex36 { public static void main(String[] args) { int x=-6, y=6; x=x+y--; System.out.println (x); } }A.-12B.12C.-1D.0
考题
以下代码的输出结果?public class Test{int x=3;public static void main(String argv[]){int x= 012;System.out.println(x);}}
A.12B.012C.10D.3
考题
研究下面的Java代码: switch (x) { case 1: System.out.println(1); case 2: case 3: System.out.println(3); case 4: System.out.println(4); } 当x=2时,运行结果是()。 A、没有输出任何结果B、输出结果为3C、输出结果是3和4D、输出结果是1、3和4
考题
分析下列Java代码: class A { public static void main(String[] args) { method(); } static void method() { try { System.out.println("Hello"); System.exit(0); } finally { System.out.println("good-bye"); } } } 编译运行后,输出结果是()。 A、"Hello"B、"good-bye"C、"Hello"后面是"good-bye"D、代码不能编译
考题
分析下列java代码 Class A{ Public static void main(String[] args){ Method(); } Static void method(){ try{ System.out.println(“hello”) }finally{ System.out.println(“good-bye”); } } } 编译运行后,输出结果是()A、“hello”B、“good-bye”C、“hello”“good-bye”D、代码不能编译
考题
单选题研究下面的Java代码: switch (x) { case 1: System.out.println(1); case 2: case 3: System.out.println(3); case 4: System.out.println(4); } 当x=2时,运行结果是()。A
没有输出任何结果B
输出结果为3C
输出结果是3和4D
输出结果是1、3和4
考题
单选题分析下列Java代码: class A { public static void main(String[] args) { method(); } static void method() { try { System.out.println("Hello"); System.exit(0); } finally { System.out.println("good-bye"); } } } 编译运行后,输出结果是()。A
HelloB
good-byeC
Hello后面是good-byeD
代码不能编译
考题
单选题分析下列代码: Class A{ Public static void main(String[] args){ method(); } static void method(){ try{ System.out.println("Hello"); }finally{ System.out.println("good-bye"); } } } 编译运行后,输出结果是()。A
HelloB
good-byeC
Hellogod-byeD
代码不能编译
考题
单选题分析下列java代码 Class A{ Public static void main(String[] args){ Method(); } Static void method(){ try{ System.out.println(“hello”) }finally{ System.out.println(“good-bye”); } } } 编译运行后,输出结果是()A
“hello”B
“good-bye”C
“hello”“good-bye”D
代码不能编译
热门标签
最新试卷