Tuesday, 19 April 2011

Does a static synchronized method block a non-static synchronized method

No As the thread executing the static synchronized method holds a lock on the class and the thread executing the non-satic synchronized method holds the lock on the object on which the method has been called, these two locks are different and these threads do not block each other.

No comments:

Post a Comment