How to find duplicates in an ArrayList<Object>?

后端 未结 4 1623
轮回少年
轮回少年 2020-12-25 08:54

This is a pretty common question, but I could not find this part:

Say I have this array list:

List arrayList = new List

        
4条回答
  •  萌比男神i
    2020-12-25 09:25

    please see this article that explains the importance of equals() and hashCode to HashSets

    Also, see this previously answered question

提交回复
热议问题