Skip to content

Instantly share code, notes, and snippets.

@adojos
Last active March 9, 2023 11:07
Show Gist options
  • Save adojos/bf03bffabc2895cb1d071bb6f7ab8841 to your computer and use it in GitHub Desktop.
Save adojos/bf03bffabc2895cb1d071bb6f7ab8841 to your computer and use it in GitHub Desktop.
Java: Concatenate Strings Using String.join() #java
private static void usingStringJoin() {
String string1 = "red";
String string2 = "blue";
String result = String.join(" ", string1,string2);
System.out.println(result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment