black

Java认证考试综合练习

登录

单项选择题

下述代码执行后,可以被垃圾收集器收集的对象是哪一个() 
Student stua; 
stua = new Student(“Mike”); 
Student stub; 
stub = stua; 
stua = new Student(“Jack”);  

A.Student(“Mike”)
B.stua
C.stub
D.以上都不是

相关考题

单项选择题 public class Pet{}  public class Cat extends Pet{}   执行代码   Cat c = new Cat();   Pet p = (Pet)c;   下列哪项是正确的?

单项选择题 class Foo {  public static void main(String [] args) {  int x = 0;  int y = 4;  for(int z=0; z 〈 3; z++, x++) {  if(x 〉 1 & ++y 〈 10) y++;  }  System.out.println(y);  }  }  结果是什么?()

单项选择题 5. class Order2 implements Runnable {  6. public void run() {  7. for(int x = 0; x 〈 4; x++) {  8. try { Thread.sleep(100); } catch (Exception e) { }  9. System.out.print("r");  10. } }  11. public static void main(String [] args) {  12. Thread t = new Thread(new Order2());  13. t.start();  14. for(int x = 0; x 〈 4; x++) {  15. // insert code here  16. System.out.print("m");  17. } } }  哪一个插入到第15行,最有可能产生输出 rmrmrmrm ?()

All Rights Reserved 版权所有©求知题库网库(csqiuzhi.com)

备案号:湘ICP备14005140号-1

经营许可证号:湘B2-20140064