Answer
Runnable represents a task with no result and no declared checked exception; Callable returns a result and may throw an exception. • Runnable.run returns void. • Callable.call returns a value. • ExecutorService.submit can accept either and returns a Future.
Example
Code
java.util.concurrent.Callable<Integer> task = () -> 42; var executor = java.util.concurrent.Executors.newSingleThreadExecutor(); System.out.println(executor.submit(task).get()); executor.shutdown();
Output
42
Quick Revision
Runnable returns no value; Callable returns a value and may throw.