Answers for "java stream join string"

1

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( "," ) );
Posted by: Guest on March-12-2020
1

String joiner in streams java

setOfTags.stream().collect(Collectors.joining(";"))
Posted by: Guest on February-07-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language