Looking at the javadocs it just says
<T> Future<T> submit(Runnable task, T result)
Submits a Runnable task for execution and returns a Future representing that task. The Future's get method will return the given result upon successful completion.
Parameters:
task - the task to submit
result - the result to return
but what does it do with result? does it store anything there? does it just use the type of result to specify the type of Future<T>
?
FutureTask
constructor api: "result - the result to return on successful completion. If you don't need a particular result, consider using constructions of the form: Future<?> f = new FutureTask<Object>(runnable, null)" – Csc