For using threads in JAVA see Java Threads
A thread is a processor activity in a process. The same process can have multiple threads. Those threads share the process address space and can therefore share data.
Mutliple threads inside a process shared the same address space. The primitives that are used for communication and synchronization are: