You can't just do A = B to copy A to B. It will just create areference to B (so when you modify B, A will be modified as well).
In order to copy it, you need to do the following
A = new ArrayList(B)
Post a Comment
No comments:
Post a Comment