Hi
Why would you use a synchronized block vs. synchronized method?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AartiPosted Nov 17, 2011, 4:01 AM
VulpesPosted Nov 8, 2011, 3:30 PM
A synchronized method locks all of the method's code, so that only one thread can enter it at a time.