标签:AC name tst cut except getname sys shu ack
public static void main(String[] args) {
ExecutorService threadPool
=Executors.newFixedThreadPool(2);
for(int i=0;i<5;i++){
Runnable runn =new Runnable(){
public void run(){
Thread t = Thread.currentThread();
System.out.println(t.getName());
System.out.println("");
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
};
threadPool.execute(runn);
System.out.println();
}
//shutdown()
threadPool.shutdownNow();
}
标签:AC name tst cut except getname sys shu ack
原文地址:https://www.cnblogs.com/fyfday01/p/9059714.html