Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

remove duplicates from list java

 ArrayList<Object> withDuplicateValues;
 HashSet<Object> withUniqueValue = new HashSet<>(withDuplicateValues);
 
 withDuplicateValues.clear();
 withDuplicateValues.addAll(withUniqueValue);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #duplicates #list #java
ADD COMMENT
Topic
Name
6+5 =