Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java stream add to existing list

List<String> source = ...;
List<Integer> target = ...;

source.stream()
      .map(String::length)
      .forEachOrdered(target::add);
 
PREVIOUS NEXT
Tagged: #java #stream #add #existing #list
ADD COMMENT
Topic
Name
8+9 =