题目内容

以下代码段的输出结果为1. int x = 0, y = 4, z = 5;2. if (x >2、{3. if (y <5、{4. Syst以下代码段的输出结果为1. int x = 0, y = 4, z = 5;2. if (x >2、{3. if (y<5、{4. Syst
以下代码段的输出结果为
1. int x = 0, y = 4, z = 5;
2. if (x >2、{
3. if (y<5、{
4. System. out .println ("message one" );
5. }
6. else {
7. System.out.println("message two");
8. }
9. }
10. else if (z >5、{
11. System.out.println("message three");
12. }
13. else {
14. System.out.println("message four");
15. }

A. message one
B. message two
C. message three
D. message four

查看答案
更多问题

以下哪个是Java应用程序main方法的有效定义?

A. public static void main();
B. public static void main(String args );
C. public static void main(String args[] );
D. public static void main(Graphics g );
E. public static boolean main(String a[] );

下面程序段的输出结果是:int a = 2;System.out.print(a++);System.out.print(a);System.out.print(++a);

A. 333
B. 334
C. 234
D. 233

以下程序的运行结果为:public class Test{public static void main(String argv[ ]){System.out.println("good"+"morning");}}

A. goodmorning
B. "good"+"morning"
C. good morning
D. good+morning

以下程序的输出结果为:public class test {public static void main(String args[]) {int x=1,y=1,z=1;if (x--==1&&y++==1||z++== 1、System.out.println("x="+x+",y="+y+",z="+z);}}

A. x=0,y=2,z=1
B. x=1,y=2,z=1
C. x=0,y=1,z=1
D. x=0,y=2,z=2

答案查题题库