Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to remove null values collections

2. HOW TO REMOVE NULL VALUES
List<String> list = new ArrayList
                   (Arrays.asList("Java",null,"Python",null, "Ruby"));
CollectionUtils.filter(list, PredicateUtils.notNullPredicate()); 
                                                     ==> removes nulls
System.out.println(list);
 
PREVIOUS NEXT
Tagged: #remove #null #values #collections
ADD COMMENT
Topic
Name
4+8 =