Java concurrency
The Java programming language and the Java virtual machine (JVM) are designed to support concurrent programming. All execution takes place in the context of threads. Objects and resources can be accessed by many separate threads, with each thread with its own path of execution, but with access to any object in the program. Read and write access to objects must be properly coordinated (or "synchronized") between threads. Thread synchronization ensures that objects are modified by only one thread at a time and prevents threads from accessing partially updated objects during modification by another thread.