That still produces a soft copy. Java makes it rather cumbersome to get a good deep copy because it functions using references/pointers for objects. Even Cloneable objects sometimes return only...
Type: Posts; User: helloworld922
That still produces a soft copy. Java makes it rather cumbersome to get a good deep copy because it functions using references/pointers for objects. Even Cloneable objects sometimes return only...
Do you mean a deep copy? Java works via references so it's a rather big pain to perform a deep copy.
Your code simply gets a reference to the ArrayList at row s. You can copy that ArrayList, but...
myArrayList2D.get(row).set(col, value);
In Java, you can fake 2D ArrayLists by making an ArrayList of ArrayLists of some type (it's not as confusing at it sounds).
I wrote that class as an example of how to utilize this, but it's really...