Look at the code below, here's a question about it. Why I run this program, It won't stop when it comes the end? ( run it in eclipse, it need to stop manually.) Could anyone explain why?
public class C1 {
public static void main(String[] args) {
C1 c1 = new C1();
c1.send();
}
private static final int POOL_SIZE = 5;
private ExecutorService theadPool = Executors.newFixedThreadPool(POOL_SIZE);
public void send() {
this.theadPool.execute(new Runnable() {
public void run() {
System.out.println("haha");
}
});
}
}