Hi,
What would happen if the code returns in the middle of the synchronized block? Does the lock for the object be released? i.e.
synchronized (obj) {
if (/* condition */) {
return;
}
// Other stuff
}
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.