I have two for loops like the below..the second not shown is the adder: I pass verification, but code style complains: "control variable i is modified" Any suggestions? I looked at other questions in help and it seems others are doing something similar. Maybe try a while loop? int originalSize = list.size(); for (int i = 0; i < originalSize; i++) { if (list.get(i).contains("r") && !list.get(i).contains("l")) { //System.out.println("string contains r but not l: " + list.get(i)); list.remove(i); i--; originalSize--; } }