正在加载图片...
15.类 Teacher和 Student是类 Person的子类 p t Student s /p, t and s are all non-null if(t instanceof Person)is=(Student t; i 最后一句语句的结果是 A将构造一个 Student对象 B表达式是合法的 C表达式是错误的 D编译时正确,但运行时错误。 16.哪个关键字可以抛出异常? A transient B finally C throw D static 17.Man(方法的返回类型是 C boolean D static 18.哪个关键字可以对对象加互斥锁? A transient B synchronize C serialize D static 19.下列哪些语句关于内存回收的说明是正确的? A程序员必须创建一个线程来释放内存; B内存回收程序负责释放无用内存 C内存回收程序允许程序员直接释放内存 D内存回收程序可以在指定的时间释放内存对象 20.欲构造 ArrayList类的一个实例,此类继承了Lit接口,下列哪个方法是正确的? A Array List my List=new Object ( B List myList=new ArrayList () C Arraylist my List=new List (15. 类 Teacher 和 Student 是类 Person 的子类; Person p; Teacher t; Student s; //p, t and s are all non-null. if(t instanceof Person) { s = (Student)t; } 最后一句语句的结果是: A 将构造一个 Student 对象; B 表达式是合法的; C 表达式是错误的; D 编译时正确,但运行时错误。 16. 哪个关键字可以抛出异常? A transient B finally C throw D static 17. Main()方法的返回类型是: A int B void C boolean D static 18. 哪个关键字可以对对象加互斥锁? A transient B synchronized C serialize D static 19. 下列哪些语句关于内存回收的说明是正确的? A 程序员必须创建一个线程来释放内存; B 内存回收程序负责释放无用内存 C 内存回收程序允许程序员直接释放内存 D 内存回收程序可以在指定的时间释放内存对象 20. 欲构造 ArrayList 类的一个实例,此类继承了 List 接口,下列哪个方法是正确的 ? A ArrayList myList=new Object(); B List myList=new ArrayList(); C ArrayList myList=new List(); - 4 -
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有