下列代码中,第几行的obj符合垃圾收集器的收集标准?
1. Object aobj = new Object();
2. Object bobj = new Object();
3. Object cobj = new Object();
4. aobj = bobj;
5. aobj = cobj;
6. cobj = null;
7. aobj = null;
答案是第7行,我感觉第4行也符合呀,求大神给解释一下
1. Object aobj = new Object();
2. Object bobj = new Object();
3. Object cobj = new Object();
4. aobj = bobj;
5. aobj = cobj;
6. cobj = null;
7. aobj = null;
答案是第7行,我感觉第4行也符合呀,求大神给解释一下