Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to remove null values in java

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 #java
ADD COMMENT
Topic
Name
8+9 =