I have this for loop below that uses up a lot of memory because of the large amount data. The column1 and column2 variables are ArrayList <String> . Is there a less usage of memory to accomplish the same for task as below?
for (String columnA : column1)
for(String columnB : column2
String.out.println(columnA + " " + columnB);