Topic: 没见过这么变态的面试题~!

  Print this page

1.没见过这么变态的面试题~! Copy to clipboard
Posted by: simbas
Posted on: 2005-02-04 22:16

1.GC是否占资源,如果内存现有的空间不够启动GC,那怎么办?

2.如果 a 引用 b , b 也引用 a ,那 a,b 会被回收吗?

2.Re:没见过这么变态的面试题~! [Re: simbas] Copy to clipboard
Posted by: Jove
Posted on: 2005-02-05 09:37

还好啦

对于第二条,取决于当前GC算法吧,计数法就不会被回收,闭包法似乎就会

3.Re:没见过这么变态的面试题~! [Re: simbas] Copy to clipboard
Posted by: cxp108
Posted on: 2005-02-05 11:43

能不能给个详细答案

4.Re:没见过这么变态的面试题~! [Re: simbas] Copy to clipboard
Posted by: 孤独王子
Posted on: 2005-02-06 09:10

1 可以用System.gc()来建议执行,不过没有保障
2 会!因为有隔离岛存在

5.Re:没见过这么变态的面试题~! [Re: simbas] Copy to clipboard
Posted by: floater
Posted on: 2005-02-13 03:14

What's wrong with this on an app server, say weblogic?
...
System.gc();
System.gc();
...

6.Re:没见过这么变态的面试题~! [Re: simbas] Copy to clipboard
Posted by: 极地绿光
Posted on: 2005-02-20 21:04

只要程序中有该对象的一个引用,该对象就会继续存在

7.Re:没见过这么变态的面试题~! [Re: simbas] Copy to clipboard
Posted by: StrUtsOne
Posted on: 2005-02-22 09:42

1.什么是GC?
2.什么是引用.是继承么?

现在国语进化的可真快.


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923