Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

remove duplicates from arraylist in android

 ArrayList<Object> withDuplicateValues;
 HashSet<Object> withUniqueValue = new HashSet<>(withDuplicateValues);
 
 withDuplicateValues.clear();
 withDuplicateValues.addAll(withUniqueValue);
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #remove #duplicates #arraylist #android
ADD COMMENT
Topic
Name
8+5 =