E.g.
for(String str : list1) { ... } for(String str : list2) { ... }
suppose we are sure that list1.size() equals list2
list1.size()
list2
int index = 0; for(String str1 : list1) { str2 = list2.get(index++); }