Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

remove empty elements from array java

String[] objects = Arrays.stream(new String[]{"This","", "will", "", "", "work"}).filter(x -> !x.isEmpty()).toArray(String[]::new);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #empty #elements #array #java
ADD COMMENT
Topic
Name
4+4 =