public interface Runnable {
public abstract void run();
}
public interface Callable<V> {
V call() throws Exception;
}
- Runnable接口需要实现run方法,Callable需要实现call方法
- Runnable没有返回结果,Callable有返回结果
- Callable可以抛出 Checked Exception,而Runnable不可以
public interface Runnable {
public abstract void run();
}
public interface Callable<V> {
V call() throws Exception;
}