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);
Set<String> set = new LinkedHashSet<String>();
for (ArrayList<String> list:yourList)
{
set.addAll (list);
}
ArrayList<String> uniqueList = new ArrayList<String>(set);
Usefull...
ReplyDelete