iterator
An object that walks through a collection one element at a time with hasNext and next.
java.util.Iterator
Examples
Iterator<String> it = names.iterator(); while (it.hasNext()) if (it.next().isBlank()) it.remove();
An object that walks through a collection one element at a time with hasNext and next.
java.util.Iterator
Examples
Iterator<String> it = names.iterator(); while (it.hasNext()) if (it.next().isBlank()) it.remove();