import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Test {
private static Iterator<String> iterator;
public static void main(String[] args) {
List<String> list = new ArrayList<String>();
list.add("1");
list.add("2");
iterator = list.iterator();
while (iterator.hasNext()) {
String next = iterator.next();
if("1".equals(next)){
list.remove(next);
}
}
for(String s : list){
System.out.println(s);
}
}
}