E.g.
for(String str : list1) { ... } for(String str : list2) { ... }
suppose we are sure that list1.size() equals list2
list1.size()
list2
In case someone is interested, this is the solution that will iterate fully thru both lists even if they are not of the same size.
int max = Math.max(list1.size(), list2.size()); for(int i=0; i