HashSet: Hashset is introduced in 1.2V in java. The features are..
- Underlying data structure is HashTable.
- Insertion order is not preserved. It is based on hashcode of objects.
- Null insertion is possible but only once.
- Heterogeneous objects are allowed.
- Duplicate objects are not allowed.[ If tried to insert a duplicate object, Java will not throw any Compile time error or run time exception,simply the add method will return false.]
- HashSet implements serializable and cloneable interface.
- It does not implement RandomAccess Interface