In concurrent or parallel programming, there are two basic units of execution:
In the Java programming language, concurrent programming is mostly concerned with threads.
The Java programming language provides multiple mechanisms for communicating between threads: