I have some data structures, and I would like to use one as a temporary, and another as not temporary.
ArrayList myObject = new ArrayList
Here is a workaround to copy all the objects from one arrayList to another:
ArrayList myObject = new ArrayList(); ArrayList myTempObject = new ArrayList(); myObject.addAll(myTempObject.subList(0, myTempObject.size()));
subList is intended to return a List with a range of data. so you can copy the whole arrayList or part of it.