不随容器大小的变化而改变 A、 CardLayout B、 FlowLayout C、 BorderLayout D、 GridLayout 72.给出下面代码 public class Person static int arr new int10 public static void mainString a System.out.printlnarr1 那个语句是正确的 A、 编译时将产生错误 14 B、 编译时正确运行时将产生错误 C 、输出零 D、 输出空。
73.哪个关键字可以对对象加互斥锁 A、 transient B、 synchronized C、 serialize D、 static 74.下列哪些语句关于内存回收的说明是正确的 A、 程序员必须创建一个线程来释放内存 B、 内存回收程序负责释放无用内存 C、内存回收程序允许程序员直接释放内存 D、内存回收程序可以在指定的时间释放内存对象 75.下列代码哪几行会出错: 1 public void modify 2 int I j k 3 I 100 4 while I gt 0 5 j I 2 6 System.out.println quot The value of j is quot j 7 k k 1 8 I-- 9 10 A、 line 4 B、 line 6 C、 line 7 D、 line 8 76.MAX_LENGTH是int型public成员变量 变量值保持为常量100用简短语句定义这个变量。
A、 public int MAX_LENGTH100 B、 final int MAX_LENGTH100 C、 final public int MAX_LENGTH100 D、 public final int MAX_LENGTH100. 77.给出下面代码 1 class Parent 2 private String name 3 public Parent 4 5 public class Child extends Parent 15 6 private String department 7 public Child 8 public String getValue return name 9 public static void mainString arg 10 Parent p new Parent 11 12 那些行将引起错误 A、 第3行 B、 第6行 C、 第7行 D、 第8行 78.类Teacher和Student是类Person的子类 Person p Teacher t Student s //p t and s are all non-null. ift instanceof Person s Studentt 最后一句语句的结果是 A、 将构造一个Student对象 B、 表达式是合法的 C、 表达式是错误的 D、 编译时正确但运行时错误。
79.给出下面代码段 1 public class Test 2 int m n 3 public Test 4 public Testint a ma 5 public static void mainString arg 6 Test t1t2 7 int jk 8 j0 k0 9 t1new Test 10 t2new Testjk 11 12 哪行将引起一个编译时错误 A、 line 3 B、 line 5 C、 line 6 D、 line 10 16 80.对于下列代码 1 class Person 2 public void printValueint i int j //... 3 public void printValueint i//... 4 5 public class Teacher extends Person .
上一篇:
个人博客
下一篇:
那些令你为之触动的好句子,感慨万分