There are several terms touching the subject you are asking about.
Synchronization
There are number of interfaces and classes that help synchronize your code between threads. A Semaphore, a CyclicBarrier or synchronous collections like BlockingQueue. See java.util.concurrent package for a list of those classes.
The synchronized
block is also a way of synchronizing, though using it properly requires more experience.
Mutex
Different languages (and libraries) implement the standard mutex differently. The idea remains the same - in order to proceed with execution of particular code, a MUTually EXclusive token, a mutex has to be acquired. In java this acquisition happens before entering a synchronized
block.
Thread-safety
To put it simply, a class is thread safe when all its methods can be accessed in any order from any number of threads concurrently. There are several ways of acheiving thread-safety. For example, Strings are thread safe. They are not synchronized, but they are immutable and that also causes thread safety. All Collections.synchronized*()
methods return thread safe wrappers for collections, privided that all future* (*see happens-before relationship) access to them is executed through those wrappers (that's why it's a good rule for beginners to call the Collections.synchronized*()
on new
objects only.
The answer
Having the knowledge from previous paragraphs, to answer your question: no, it does not synchronize a class. It does not change the original Collection
implementation at all.
It does create a read and write thread-safe synchronized mutable kind-of-proxy to that class, however.