Java同步—Callable與Future

Callable與Future Runnable、Future、Callable的區別 Runnable咱們都用過,由於開啓一個新的線程的時候,須要傳遞一個Runnable接口做爲執行對象,這個接口裏面只包含一個run方法,無參數,無返回值。html @FunctionalInterface public interface Runnable { public abstract void run(
相關文章
相關標籤/搜索