今天在JDK的javadoc里瞎转的时候无意间发现这么一个有趣的回调方法: addShutdownHook public void <b>addShutdownHook</b>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Thread.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://download.oracle.com']);" title="class in java.lang">Thread</a> hook) public void <b>addShutdownHook</b>(<a href=”http://download.oracle.com/javase/6/docs/api/java/lang/Thread.html” onclick=”javascript:_gaq.push(['_trackEvent','outbound-article','http://download.oracle.com']);” title=”class in java.lang”>Thread</a> hook) Registers a new virtual-machine shutdown hook. The Java virtual machine shuts down in response to two kinds of events: The program exits normally, when the last non-daemon thread exits or when the exit (equivalently, System.exit) read more
烫手的
- 生活,就是一个期待跟着一个期待 - 被踩了 6,386 脚
- 悼念该悼念的,记住该记住的,知道该知道的 - 被踩了 1,570 脚
- 解决android 2.2下无法更新gmail、voice search、google search、street view - 被踩了 1,230 脚
- 关于 - 被踩了 1,113 脚
- 死于青春 - 被踩了 1,057 脚
近期评论
- CSDN这回一石激起千层浪了 | 拈花微笑 发表在《请教新浪》
- 牛肉丝 发表在《Sina,I服了U》
- 牛肉丝 发表在《一路走好》
- CSDN这回一石激起千层浪了 | 拈花微笑 发表在《猜想:互联网ID,“死号”判定与回收》
- CSDN这回一石激起千层浪了 | 拈花微笑 发表在《Sina,I服了U》
