Best way to Remove Duplicate value from arraylist in Android
The easiest way to remove repeated elements is to add the contents to a Set (which will not allow duplicates) and then add the Set back to the ArrayList:
Here my arraylist is beforedate array
HashSet hs = new HashSet();
hs.addAll(beforeDateArray);
beforeDateArray.clear();
beforeDateArray.addAll(hs);
0 Comments
Type your Comment below and click to send comment