I have a List<String>
that can contains blanks ("")
.
Is there a simple way to remove all blanks from list? I used this way to do so.
ListIterator<String> it = values.listIterator();
while (it.hasNext()) {
if (it.next().equals("")) {
it.remove();
}
}
Thanks for help!