试题详情
- 单项选择题 11.class Snoochy{ 12.Boochybooch; 13.public Snoochy(){booch=newBoochy(this);} 14.} 15. 16.class Boochy{ 17.Snoochy snooch; 18.public Boochy(Snoochys){snooch=s;} 19.} And the statements: 21.public static void main(String[]args){ 22.Snoochy snoog=new Snoochy(); 23.snoog=null; 24.//more code here 25.} Which statement is true about the objects referenced by snoog,snooch,and booch immediately after line 23 executes?()
A、None of these objects are eligible for garbage collection.
B、Only the object referenced by booch is eligible for garbage collection.
C、Only the object referenced by snoog is eligible for garbage collection.
D、Only the object referenced by snooch is eligible for garbage collection.
E、The objects referenced by snooch and booch are eligible for garbage collection.
- E
关注下方微信公众号,在线模考后查看
热门试题
- 以下涉及到内存管理的代码段中,有错误的是
- 以下关于Applet和Java程序之间关
- String foo&ens
- Which two̳
- 要产生一个动作监听器类,需要实现什么接口
- public class&e
- 下列哪项不属于Java语言的基本数据类型
- Which three&ens
- interface A&en
- 1. interface&e
- 33. try {
- 关于 JAVA 堆,下面说法错误的是()
- 求表达式e^x ≈1+x+x^2/2!+
- Which statement
- You have
- public class&e
- 已知: 那输出为()
- public static&
- 根据下面的程序代码,哪些选项的值返回tr
- Servlet A&ensp