【发布时间】:2014-09-25 09:33:42
【问题描述】:
在浏览 JDK 7 时,我发现 java.util.concurrent.RunnableFuture<V> 有一个 run 方法。我想知道在接口中复制相同的运行方法签名有什么意义,因为它已经扩展了Runnable。
package java.util.concurrent;
public interface RunnableFuture<V> extends Runnable, Future<V> {
/**
* Sets this Future to the result of its computation
* unless it has been cancelled.
*/
void run();
}
【问题讨论】:
标签: java java.util.concurrent concurrent.futures