HashSet in Java

What is HashSet HashSet extends AbstractSet and is an implementation of Set interface. HashSet also implements Serializable and Cloneable interfaces. HashSet is backed by hash table(actually HashMap instance), i.e., the HashSet uses hash table(HashMap) to store collection elements. Like HashMap, it allows null only one element.

Read More