📅  最后修改于: 2022-03-11 14:57:40.847000             🧑  作者: Mango
List list = new ArrayList
(Arrays.asList("Java",null,"Python",null, "Ruby"));
CollectionUtils.filter
(list, PredicateUtils.notNullPredicate()); ==> removes nulls
System.out.println(list);