ExecutorService interface provides 3 methods shutdown(), shutdownNow() and awaitTermination() for controlling the termination of tasks submitted to executors. Learn how to use these methods under different requirements. 1. Difference between shutdown(), shutdownNow() and awaitTermination() Let us start with checking out the syntax of these methods. void shutdown(); List<Runnable> shutdownNow(); boolean awaitTermination(long timeout, TimeUnit unit); he shutdown() initiates an orderly shutdown in which previously…