While using new_list = my_list, any modifications to new_list changes my_list everytime. Why is this, and how can I clone or copy the list to prevent it?
I have an ArrayList and I want to copy it exactly. I use utility classes when possible on the assumption that someone spent some time making it correct. So naturally, I end up with the Collections class which contains a …