How can remove duplicate values from ArrayList

- This is solution for remove duplicate values from ArrayList

Set<String> set = new LinkedHashSet<String>();
for (ArrayList<String> list:yourList)
{
    set.addAll (list);
}
ArrayList<String> uniqueList = new ArrayList<String>(set);

Comments

Post a Comment

Popular posts from this blog

Android - Set cursor drawable programmatically

Create custom button in android

Android - Shared Preferences Tutorial