Waits if necessary for this future to complete, and then
returns its result.
@return the result value
@throws CancellationException if this future was cancelled
@throws ExecutionException if this future completed exceptionally
@throws InterruptedException if the current thread was interrupted
while waiting
Waits if necessary for this future to complete, and then returns its result.
@return the result value @throws CancellationException if this future was cancelled @throws ExecutionException if this future completed exceptionally @throws InterruptedException if the current thread was interrupted while waiting