/**
* Create by ~JH~ on 2018/4/9
*//**
*一个任务返回的结果可能抛出异常,继承者定义了一个单例的没有参数的方法被称为call
*Callable接口与Runnable接口相似,这两个都是为那些可能被其他线程的执行的实例的类设计的
* Runnable不会返回一个结果,也不会跑出checked异常。
*Executor类包括多种方法来将其他普通形式转化为Callable类
* @see Executor
* @since 1.5
* @author Doug Lea
* @param <V> the result type of method {@code call}
*/@FunctionalInterface
public interface Callable<V> {
/**
* Computes a result, or throws an exception if unable to do so.
*计算一个结果,或者抛出一个不能执行的异常
* @return computed result
* @throws Exception if unable to compute a result
*/
V call() throws Exception;
}