class StringExamples {

    public static String formatArtists(List<Artist> artists) {
        // BEGIN collectors_joining
String result =
    artists.stream()
              .map(Artist::getName)
              .collect(Collectors.joining(", ", "[", "]"));
        // END collectors_joining
        return result;
    }

}