I am performing some maintenance tasks on an old system. I have an arraylist that contains following values:
a,b,12 c,d,3 b,a,12 d,e,3 a,b,12
In ArrayList we don't have a chance to remove duplicate elements directly. We can achieve it with sets, because sets don't allow duplicates, so, better to use HashSet or LinkedHashSet classes. See reference.
ArrayList
HashSet
LinkedHashSet