I have a for loop which execute 1000 times ! and I want to save the result of each iteration into an arraylist but it does not save the data from the last iteration ! it just clear the whole arraylist in every iteration and add new items to that !
how should I save the whole data ? I would not add any code because it's really complicated and really hard to explain what's going on in the loop . I want to generally know how to solve the problem and be able to save the whole data