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?
© 版权声明
THE END
暂无评论内容