[阅读: 317] 2006-08-22 10:13:31
package bjepb.unittest;
import bjepb.promng.Management;
public class TestRunner {
public static void main(String[] args) {
ThreadGroup threadgroup = new ThreadGroup("GroupChild");
for (int i=0; i<10; i++)
{
Thread thread = new Thread(threadgroup,new TestEmployee());
thread.setName("wy-".concat(Integer.toString(i+1)));
thread.start();
}
while (threadgroup.activeCount() != 1)
{
//System.out.println("activeCount " + Integer.toString(threadgroup.activeCount()));
try{
Thread.sleep(2000);
}
catch (Exception e){
e.printStackTrace();
}
}
Management.getManagement().PrintEmployees();
}
}
民主不同于专制,不需要强加于人。--- 賴斯
大道之行也,天下为公,选贤与能,讲信修睦。故人不独亲其亲,不独子其子,使老有所终,壮有所用,幼有所长,矜、寡、孤、独、废疾者,皆有所养。男有分,女有归。货恶其弃於地也,不必藏於己;力恶其不出於身也,不必为己。是故,谋闭而不兴,盗窃乱贼而不作,故外户而不闭,是谓大同。--《礼运·大同篇》