Skip to main content

Timeline for answer to Java: convert List<String> to a join()d String by micha

Current License: CC BY-SA 4.0

Post Revisions

9 events
when toggle format what by license comment
Jul 25, 2022 at 5:41 history edited Basil Bourque CC BY-SA 4.0
added 43 characters in body
Mar 13, 2019 at 7:36 comment added aff @Marc String.join also accepts Iterable<CharSequence>; Interface relationship: Iterable -> Collection -> List
Aug 22, 2016 at 15:49 vote accept Jason S
Feb 17, 2016 at 6:26 comment added koppor StringJoiner is especially useful if one wants to join to something like [a, b, c] including the braces.
Dec 9, 2015 at 5:22 comment added Sanghyun Lee @Marc assertThat(String.join(", ", Lists.newArrayList("1", null)), is("1, null"));
Jun 22, 2015 at 12:22 comment added Marc Unfortunately, String.join only accepts CharSequences and not as one would hope Objects. Not even sure if it's nullsafe
S Oct 9, 2014 at 7:07 history suggested 200_success CC BY-SA 3.0
Fixed broken links; mention StringJoiner
Oct 9, 2014 at 6:35 review Suggested edits
S Oct 9, 2014 at 7:07
Mar 22, 2014 at 12:25 history answered micha CC BY-SA 3.0