Yup... that's the correct answer.
Synchronization is based on objects -- not references. This means that even though the references are different, it works because they all point to the same object.
Another issue to be concerned about (which doesn't apply here), is the synchronization to the same reference that changes, also breaks because of this same rule. I have seen cases of classes synchronizing to an "error" object, right after they set it to a new error. In this case, same reference, but different object -- not really that useful.
So, my guess is this is why they are all locking on the same object. I bet this is also why you can only lock on objects and not primitives. Since if you pass a primitive around, you get a new copy of that primitive. Let me know if this is wrong, I find this topic difficult too.
Another issue is that a lock (monitor) is actually encapsulated into the Object class. You can't lock a primative, because there is nothing to lock.
Henry
[ September 07, 2006: Message edited by: Henry Wong ]