An `ExecutorService` is actively running tasks. A separate thread calls the `shutdown()` method on the service. Immediately after, another attempt is made to submit a new task using the `submit()` method. What will be the result of this second submission attempt?
-
A
The submission will be rejected, and a `RejectedExecutionException` will be thrown.
-
B
The task will be accepted and placed in the queue to be executed after the currently running tasks complete.
-
C
The `submit()` call will block indefinitely until the `ExecutorService` has fully terminated.
-
D
The new task will be executed immediately by the calling thread.