摘要: Runnable任务没有返回值,而Callable任务有返回值。并且Callable的call()方法只能通过ExecutorService的submit(Callable task) 方法来执行public class RunnableTestMain { public static void main(String[] args) { ExecutorService pool = Executors.newFixedThreadPool(2); /** * execute(Runnable x) 没有返回值。可以执行任务,... 阅读全文
posted @ 2014-01-07 11:37 西北野狼 阅读(2088) 评论(0) 推荐(0) 编辑