The Java programming language has a very rich concurrency API. It contains classes to manage the basic elements of concurrency, such as
Semaphore, and classes that implement very high-level synchronization mechanisms, such as the executor framework
or the new parallel
In this section, we will cover the basic classes that form the concurrency API.
The basic classes of the Java concurrency API are:
Threadclass: This class represents all the threads that execute a concurrent Java application
Runnableinterface: This is another way to create concurrent applications in Java
ThreadLocalclass: This is a class to store variables locally to a thread