下列代码经过编译将输出()。
A.99
B.0
C.编译出错
D.运行出错
第1题:
运行下列代码后,正确的结果为: public class Test { static int age; public static void main (String args []) { age = age + 1; System.out.println("age=" + age); } }
A.编译运行后无任何输出
B.编译运行后输出 age=1
C.编译运行后输出 age=0
D.编译出错
第2题:
编译并运行以下程序,以下描述哪个选项是正确的?() class A{ protected boolean equals(){ return super.equals(); } }
A.编译通过运行无异常
B.编译通过但运行时出错
C.行2出错,不能成功编译
D.不能成功编译,行3出错
第3题:
编译并运行以下程序,以下描述哪个选项是正确的 class A{ protected boolean equals(){ return super.equals(); } }
A.编译通过运行无异常
B.编译通过但运行时出错
C.行2出错,不能成功编译
D.不能成功编译,行3出错
第4题:
以下代码的编译运行结果为()。 public class Test { public static void main(String args [ ]){ int age; age = age + 1; System.out.println("The age is " + age); } }
A.编译通过,运行无输出
B.编译通过,运行输出:The age is 1
C.编译通过,但运行时出错
D.不能通过编译
第5题:
运行下列代码后,正确的结果为: public class Test { static int age; public static void main (String args []) { age = age + 1; System.out.println("age=" + age); } }
A.编译运行后输出 age=0
B.编译运行后输出 age=1
C.编译出错
D.编译运行后无任何输出