Threads Synchronization


Synchronization is done in order to protect a segment of code from being accessed by more than a single Thread at any particular instance of time. In Java, synchronization is achieved with the use of synchronized keyword. Synchronization can be applied to methods as well as to a block of code. also read: Java Tutorials […]