Monthly Archive: May 2013
Deadlock can occur in a situation when a thread is waiting for an object lock, that is acquired by another thread and second thread is waiting for an object lock that is acquired by first …
A synchronized method or block works on a given monitor. Synchronized non-static methods all synchronize on the Java instance of a class. Each instance has a lock monitor. For the case of static methods, what …
Synchronized block can be used to perform synchronization on any specific resource of the method. Suppose you have 100 lines of code in your method, but you want to synchronize only 5 lines, you can …
In this Java synchronization tutorial we will see what is meaning of Synchronization in Java, Why do we need Synchronization in java, what is java synchronized keyword, example of using java synchronized method and blocks …