Skip to content

Instantly share code, notes, and snippets.

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