I am using an arraylist that contains duplicate copies of object. I can determine the duplicate copies using lastIndexOf method. After determination, I can remove that duplicate item from list. Now, AFAIK, on removal of item from list, the overall structure of the list would get damaged. I mean if I remove item number 5 from list, then at location 5, nothing would be there which would utlimatly lead to traversing problem. I have read the stack overflow similar questions and tried every single one like hashset, for me, they dont work. How can I maintain a unique Arraylist containing string only.
问问题
125 次