Choose between ExecutorService’s submit and ExecutorService’s execute
How should I choose between ExecutorService’s submit or execute, if the returned value is not my concern? If I test both, I didn’t see any differences among the two except the returned value. ExecutorService threadExecutor = Executors.newSingleThreadExecutor(); threadExecutor.execute(new Task()); ExecutorService threadExecutor = Executors.newSingleThreadExecutor(); threadExecutor.submit(new Task()); 7 Answers 7