runFinalizersOnExit(boolean) - Static method in class java.lang.System
Deprecated. This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.
Deprecated. This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.
解决方案 »
- 在Servlet里用DOM这样读XML为什么说找不到xml文件?
- 如果将一个int型的数字转换成长度为4的字节串?????
- 有段代码不知道哪里错了,求指点!
- Struts 的web.xml配置问题
- 循环内存取数组元素为什么不好?(书上原话请看帖子内容)
- 使用Process p = Runtime.getRuntime().exec(cmdString);时,能不能一次提交2条命令?
- 谁能告诉我98下的环境变量要如何配置呀
- 请问如何将用textpad写出来的java程序做成.exe的形式?
- 求教一个问题
- 关于集合的问题,求助,着急
- 求Jbuilder6的中文电子文档,谢啦
- 初学java,不知哪有可视化组件下载?(重分酬谢,立即给分)
好几次把书上的例子哪来,(jdk1.1通过)再jdk1.4下运行就提示,,,警告
答 是因为不同的版本的问题。
我在 java 1.2 下运行,结果与书上一致。
java 1.3.0 下运行,结果与你的一致。原来的顺序容易理解,现在这个方法被deprected了。
所以,你不知道什么时候调用哪个object 的finalize();
因为,这要看VM如何安排object 的调用堆栈的。