Skip to content

Two objects that share one list

A copy() method creates a new object and assigns each field across. Later, changing a list on the copy also changes the original.

What is happening?