what id hashset in java code example
Example 1: java hashset
HashSet<String> hset = new HashSet<String>();
// Adding elements to the HashSet
hset.add("Apple");
hset.add("Mango");
Example 2: HashSet h = new HashSet();
HashSet<String> h = new HashSet<String>();