String result;
try {
// Send the list of tasks to the executor and waits for the result of the first task
// that finish without throw and Exception. If all the tasks throw and Exception, the
// method throws and ExecutionException.
result = executor.invokeAny(taskList);
System.out.printf("Main: Result: %s\n",result);
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();