Skip to content

Instantly share code, notes, and snippets.

@rmit-s3668804-Dzmitry-Kakaruk
Created May 20, 2017 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmit-s3668804-Dzmitry-Kakaruk/7cb0f29c147cfb99e503f504ba3787f5 to your computer and use it in GitHub Desktop.
Save rmit-s3668804-Dzmitry-Kakaruk/7cb0f29c147cfb99e503f504ba3787f5 to your computer and use it in GitHub Desktop.
list of integer to string
// list of integer to string
List<Integer> numbers = Arrays.asList(1, 2, 3, 4);
String commaSeparatedNumbers = numbers.stream()
.map(i -> i.toString())
.collect(Collectors.joining(", "));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment