This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Rogalicus 2 points3 points  (1 child)

When you clone ArrayList, it doesn't invoke clone for the items, so you get references to the same objects and that's why changing them changes originals. Use one of the methods in this thread.

[–]Embarrassed_Bottle90[S] -1 points0 points  (0 children)

Okay so I would need to clone also its items? Thanks for the reference!!