Which method in ExecutorService stops all actively executing tasks?

  1. shutdown()
  2. terminate()
  3. shutdownNow()
  4. cancel()
Correct answer shutdownNow()

Explanation

`shutdownNow()` attempts to stop all active tasks immediately.

Update: Admin added a tag on this question

Topics

By Admin · · 35 views