Hi, What does this statement means. It is from Applied Reasoning Java Ceritification Mock Exam: Hashmaps provide synchronized access through synchronized wrappers. What is meant by synchronized access and synchronized wrapper. Thanks Muhammad Ali
Synchronized access means that not more than one thread is able to access the container at the same time. Sybchronized wrappers refers to the objects returned by these kind of methods: Collections.synchronizedCollection( new TreeSet() ); Collections.synchronizedMap( new HashMap() ); Collections.synchronizedList( new ArrayList() ); etc. They are in java.util.Collections and return an object that wraps the Collection/Map passed as argument and makes them synchronized. Consult the API for the way to use them.