HashSet extends AbstractSet and implements the Set interface. Internally the HashSet create a collection which uses hash table for storage, the hash table uses hashing mechanism to store data, the below things you should consider if you are planning to use HashSet
The HashSet will not allow duplicate values it won’t give any error while adding instead of error it will just return boolean values
There is no guarantee that whatever order you have stored you will get it
A technology enthusiast and a professional blogger from India. Through out my IT career, I have had the pleasure of working on various new technologies and built products like www.ziprides.com and some other products. Unfortunately, my attempts have not given me the desired results and as a result, I have finally decided to build a professional blog where I would like to share all my learnings and hoping to learn from other enthusiasts around the world.