List<String> list = new ArrayList<String>();
list.add("One");
list.add(null);
list.add("Two!");
list.add(null);
list.add("Three");
list.add(null);
list.add("Four");
list.add(null);
I have a list containing null elements. Is there any way to remove the null elements from the current collection without using any iterations?
See Question&Answers more detail:os