make a deep or shallow copy? I am trying to get an arrayList to collect data but iterating though an algorithm and then place that data into a new arrayList three times. Each new array has if (i = 0), if (i=1) etc around it, but they all have the same data at the end! (only Integer objects).array.add(data.get(y));
I have been writing code for 2 days now, please feel free to point out the obvious.