摘要: 1 package thread; 2 3 /** 4 * 需求:线程编程:子线程先运行 2 次,然后主线程运行 4 次,如此反复运行 3 次。 5 * @author zhongfg 6 * @date 2015-06-16 7 */ 8 class Business { // 控制由... 阅读全文
posted @ 2014-02-27 21:25 Self_improve 阅读(365) 评论(0) 推荐(0) 编辑
摘要: package thread;/** * Java线程面试题 * @author zhongfg * @date 2015-06-16 */public class ThreadInterview2 { // 定义全局变量 private int j; public static ... 阅读全文
posted @ 2014-02-27 20:09 Self_improve 阅读(504) 评论(0) 推荐(0) 编辑
摘要: 会的。原因:长生命周期的对象持有短生命周期对象的引用,导致短生命周期对象不能被回收,由此可能发生内存泄露。举例参考:http://blog.csdn.net/yakihappy/article/details/3979942 阅读全文
posted @ 2014-02-27 17:33 Self_improve 阅读(131) 评论(0) 推荐(0) 编辑