Which Java Collections are synchronized, which are not?
Example: HashSet is not synchronized
Easy answer: not a single implementation of Collection
is synchronized because synchronized
is not a class property, it is only applicable to methods and blocks.
I guess, you want to know which implementations are thread safe, which classes from the java collection framework can safely be used in a multithreaded environment.
The information is always included in the javadoc (like here: Arraylist - which is not thread safe)