0
Iterator
public static void removeEvenLength(List<String> list) { Iterator<String> itr= list.iterator(); while (itr.hasNext()) { String element=itr.next(); if (element.length()%2==0) { i.remove(); } } } // why is iterator object not created with ”new” keyword for list collection in java
1 ответ