2013年1月5日
摘要: import java.util.Random;/** *利用ThreadGroup等待所有线程执行结束 */public class T { public static void main(String[] args) { ThreadGroup group1 = new ThreadGroup("group-one"); for(int i=1; i<=10; i++){ new Thread(group1, new GroupThreadMem(),i+"#线程").start(); } ... 阅读全文
posted @ 2013-01-05 11:17 cfd406635982 阅读(2056) 评论(0) 推荐(0) 编辑
摘要: /** * StackTraceElement的用法 */public class Test { /** * @param args */ public static void main(String[] args) { new TestM().OuterMethod(); } public void methodA(){ methodB(); } public void methodB(){ methodC(); } public void methodC(){ ... 阅读全文
posted @ 2013-01-05 10:40 cfd406635982 阅读(9921) 评论(1) 推荐(1) 编辑