Posted By:
Edward_Harned
Posted On:
Saturday, November 7, 2009 11:31 AM
Every object has a built-in monitor. This way you can synchronize on any object. That is, you can create an object in one thread, pass a reference to that object to another thread and both threads can synchronize on the object.
Locks come with the java.util.concurrent.locks package. You need to read the description for that package. (Too much to do here.)