Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java stream collect to string

List<Integer> numbers = Arrays.asList( 4, 8, 15, 16, 23, 42 );
return numbers.stream()
        .map( n -> n.toString() )
        .collect( Collectors.joining( "," ) );
Source by coderwall.com #
 
PREVIOUS NEXT
Tagged: #java #stream #collect #string
ADD COMMENT
Topic
Name
2+1 =