Java Threads Question:
Why would you use a synchronized block vs. synchronized method?
Answer:
Synchronized blocks place locks for shorter periods than synchronized methods.
Previous Question | Next Question |
When you will synchronize a piece of your code? | What is an objects lock and which objects have locks? |