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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…