The java.util.concurrent package
In the previous section, we focused on Java's low-level support for threads. In this section, we will move on to look at Java's high-level thread support provided by the java.util.concurrent
package. This package has various classes and interfaces that provide very useful functionalities to help us implement multithreaded and concurrent programming. In this section, we will mainly focus on some of the most useful utilities of this package.
The following diagram shows the high-level overview of the java.util.concurrent
API:

Let's discuss the interfaces in detail.
Executors
Executor
provides an abstraction layer over all the internal thread management tasks and manages the entire concurrent execution flow of the threads. An Executor
is an object that executes tasks provided.
The Java concurrency API provides the following three basic interfaces for executors:
Executor
: This is a simple interface that is used to launch a new task. It does not strictly require the...