Like many of the java.util.concurrent classes, added with Java 5, it is made thread safe optimistically -- with the atomic libraries. This is why the ReentrantLock class, which implements the synchronized functionality, is actually faster (under many conditions).
Probably with ReentrantLock's, but the fact is I don't honestly know - and you don't need to either.
That's the whole point of Object-Orientation: You don't need to know how something works; you just need to know what it does.
And for more info on that subject, you might want to read the WhatNotHow (←click) page.
Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here