Skip to content

Instantly share code, notes, and snippets.

@adojos
Last active March 9, 2023 11:04
Show Gist options
  • Save adojos/05f8ad1cc0945ff9be1baa130279bdcb to your computer and use it in GitHub Desktop.
Save adojos/05f8ad1cc0945ff9be1baa130279bdcb to your computer and use it in GitHub Desktop.
Java: Concatenate Strings Using String.join() With List #java
private static void usingStringJoinWithList() {
List<String> colours = Arrays.asList("red","blue","green","white");
String result = String.join("/", colours);
System.out.println(result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment