Difference between Hashtable and Collections.synchronizedMap(HashMap)
As far as I know, java.util.Hashtable synchronizes each and every method in the java.util.Map interface, while Collections.synchronizedMap(hash_map) returns a wrapper object containing synchronized methods delegating calls to the actual hash_map (correct me if I am wrong). I have two questions : What difference does it make to synchronize each and every method and to have a wrapper class? What are the scenarios to choose one over the other? What happens when we do Collections.synchronizedMap(hash_table) ? Will this be equal to simply using a normal java.util.Hashtable ? Nadir Muzaffar Here are