-
-
Save rmit-s3668804-Dzmitry-Kakaruk/7cb0f29c147cfb99e503f504ba3787f5 to your computer and use it in GitHub Desktop.
list of integer to string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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