Does a synchronized method throwing exception release the object lock? Is there any case (abnormal) that a synchronized method does not release a lock?
Thankx,
Nandu
Hard to tell exactly what you mean from your description but once the method is complete either from a return, a thrown Exception, or an unchecked Exception. Whichever way, the method should release the lock, otherwise there would be real issues with Java as a threaded programming language.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.