Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java how to make set

//Creating HashSet 
HashSet<String> set = new HashSet(); 

//adding elements  
set.add("One");    
set.add("Two");    

//Removing element);
set.remove("One"); 

//Removing all the elements available in the set  
set.clear();  
Source by www.javatpoint.com #
 
PREVIOUS NEXT
Tagged: #java #set
ADD COMMENT
Topic
Name
8+1 =