Submits a value-returning task for execution and returns a Future representing the pending results of the task. The Future's
get method will return the task's result upon
successful completion.
If you would like to immediately block waiting for a task, you can use constructions of the form result = exec.submit(aCallable).get();
Note: The {@link Executors} class includes a set of methodsthat can convert some other common closure-like objects, for example, {@link java.security.PrivilegedAction} to{@link Callable} form so they can be submitted.
@param task the task to submit
@return a Future representing pending completion of the task
@throws RejectedExecutionException if task cannot be scheduledfor execution
@throws NullPointerException if task null