摘要: public interface Executor{ void executor(Runnable command);}如上所写,Executor实际上是一个接口,他提供了唯一的接口方法executor(Runnable command)Executor实际上是提供了一个线程池的概念, 他的优点是实... 阅读全文
posted @ 2015-12-26 15:30 CBDoctor 阅读(317) 评论(0) 推荐(1) 编辑
摘要: 一提到Java多线程,首先想到的是Thread继承和Runnable的接口实现Thread继承public class MyThread extends Thread { public void run(){ int i = 0; System.out.println("------------... 阅读全文
posted @ 2015-12-26 13:41 CBDoctor 阅读(348) 评论(0) 推荐(0) 编辑