Well title says it, what is the difference between Executors.newSingleThreadExecutor().execute(command) and new Thread(command).start();
Well title says it, what is the difference between Executors.newSingleThreadExecutor().execute(command) and new Thread(command).start();
Share
Behaviourally, pretty much nothing.
However, once you have an
Executorinstance, you can submit multiple tasks to it, and have them executed one after another. You can’t do that simply with a rawThread.