Answers for "java hashset"

1

how to push an element in hashset java

HashSet<Integer> set=new HashSet<>();
//adding a new element
set.add(10);
Posted by: Guest on May-02-2020
1

java hashset

HashSet<String> hset = new HashSet<String>();
// Adding elements to the HashSet
hset.add("Apple");
hset.add("Mango");
Posted by: Guest on September-08-2020
-1

what is hashset in java

- HashSet can have null, order is not guaranteed
Posted by: Guest on January-06-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language