Synchronization vs Lock
问题 java.util.concurrent API provides a class called as Lock , which would basically serialize the control in order to access the critical resource. It gives method such as park() and unpark() . We can do similar things if we can use synchronized keyword and using wait() and notify() notifyAll() methods. I am wondering which one of these is better in practice and why? 回答1: If you're simply locking an object, I'd prefer to use synchronized Example: Lock.acquire(); doSomethingNifty(); // Throws a