In Java threading support, threads mostly communicate with each other via shared objects or shared member variables within the same object. Three type of complications can arise from this when multiple threads are allowed to access the same piece of memory. Thread Interference . Different threads access (read and write) the same data. This can lead to race conditions. The program behavior (what gets stored in the shared memory) depends on the order in which threads get access. This can cause non-deterministic behavior. Memory Consistency Errors . If multiple threads are updating the same variable, they can see a stale (inconsistent) value of a variable. Thread Contention . If locks are not used correctly, threads can get in each other's way, and slow down or sometimes even have to be killed by Java. Let's look at the first two problems. If two threads access the same variable, it is possible for them to get in each other's way. That is because Java might switch execution fr...