What does `Collectors.joining()` do when used in a stream pipeline?

Java Professional Medium

Java Professional — Medium

What does `Collectors.joining()` do when used in a stream pipeline?

Key points

  • `Collectors.joining()` creates a single String from stream elements.
  • It allows customization with delimiter, prefix, and suffix.
  • This collector is useful for creating CSV-like strings from a stream.

Ready to go further?

Related questions