摘要:
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(); } ... 阅读全文
摘要:
/** * 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(){ ... 阅读全文