import java.util.*;
class Quizful {
public static void main(String[] args) {
List<String> arrayList = new ArrayList<String> ();
arrayList.add("One");
arrayList.add("Two");
arrayList.add("Three");
for (Iterator<String> iter = arrayList.iterator(); iter.hasNext();) {
String current = iter.next();
if (current.length() == 3) {
arrayList.remove(current);
}
}
for (String current:arrayList)
System.out.println(current);
}
}
Login in to like
Login in to comment