Monday, February 23, 2009

Java移除集合內所有的null element

只需一行
resultList.removeAll(java.util.Collections.singleton(null));