谋学网www.mouxue.com
System.out.println(\A. 0 B. 1 C. 2 D. 3
正确答案:BCD
9. 已知如下类说明: public class Test { private float f = 1.0f; int m = 12; static int n=1; public static void main(String arg[]) { Test t = new Test(); // 程序代码? } } 如下哪个使用是正确的? A. t.f B. this.n C. Test.m D. Test.n 正确答案:AD
10. 在如下源代码文件Test.java中, 哪个是正确的类定义?
A. public class test { public int x = 0; public test(int x) { this.x = x; } } B. public class Test{ public int x=0; public Test(int x) { this.x = x; } }
C. public class Test extends T1, T2 { public int x = 0; public Test (int x) { this.x = x; } }
D. public class 正确答案:BD