The submit(...)
method is an executor framework extension introduced in ExecutorService
interface.
Its main difference from execute(Runnable)
is that submit(...)
can accept a Callable<V>
(whereas execute()
accepts only Runnable
) and returns an instance of Future<V>
, which you can use later in the caller to retrieve the result asynchronously (potentially blocking until the computation performed by the Callable
is completed).