Thread Synchronization in Java | Synchronized Method & Block
Thread synchronization in Java prevents a thread from accessing any shared resources being used by another thread. During the thread synchronization process, if thread T1 is working on object O1, we prohibit thread T2 from accessing object O1. The “synchronized” modifier is used to establish synchronization. It only applies to methods and blocks; classes and…
Read More “Thread Synchronization in Java | Synchronized Method & Block” »