Sometimes we need to create a string that contains comma-separated values emitted by a stream. The collect() operation with the Collectors.joining() collector (with a parameter that describes a delimiter) is very convenient way to do it.
The post Java streams 29. Collect 5. Method join() and Collectors.joining() collector appeared first on Nick Samoylov, programmer and writer.
Published on June 27, 2020 17:06