How HashMap works in JAVA

How HashMap works in JAVA

HashMap permits null values and the null key. The HashMap class is equivalent to Hashtable, except that it is unsynchronized and permits nulls. This class makes no guarantees as to the order of the map.

If you think that in your project multiple threads will access a hash map concurrently, and at least one of the threads modifies the map structurally, it must be synchronized externally.

Gopal Das
Follow me

Gopal Das

Founder at GopalDas.Org
He is a technology evangelist, Salesforce trainer, blogger, and working as a Salesforce Technical Lead. After working in Java based project implementation, he jumped to the Salesforce system on a whim and never looked back. He fell in love with Salesforce’s flexibility, scalability, and power. He expanded his knowledge of the platform and became a Certified App Builder, Administrator, Platform Developer I, SalesCloud Consultant while leading the Salesforce implementation and technology needs. He has worked in a wide variety of applications/services like desktop, web and mobile applications.
Gopal Das
Follow me

Leave a Reply

Your email address will not be published. Required fields are marked *