Yes your understanding is correct. List newList = new ArrayList(collection);
will do a shallow copy. You can modify the newList
without affecting the original collection
, but they will each reference the same elements so if you modify an element in one list, the other list's element will also get the change.
This is called a Shallow Copy. Here's a visual representation of what I've described:
The things at the bottom are the objects in your array.