Getting duplicated objetcs in ArrayList

Greetings community, it turns out that I have a job for the university, it’s something very simple but I find it complex to achieve since I do not have much experience with Java.

I have a list of objects in an ArrayList, I can add, delete and do other operations with that list using a “for each” loop. But I do not know how to count the objects on the list that are repeated. I have looked at some articles but they are with lists of integers as an example, where one can create another Array and iterate over both and compare the values of the positions.

How would you proceed with an ArrayList of objects?

原文链接:Getting duplicated objetcs in ArrayList

© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容