关于线程池的一点问题(实习生)
今天看书看到这样一条语句
ExecutorService e = Executors.newFixedThreadPool(5);
e.execute(任务);
请问各位师兄:
1.为什么ExecutorService接口能创建引用e?
这个引用e是什么意思?
newFixedThreadPool()方法返回ExecutorService,这里的ExecutorService是对象还是其他什么?
2.接口里的抽象方法不都是在具体类中实现的吗?
既然是抽象方法为什么e又能调用Executor接口里的xexcute()方法?
希望各位师兄作答