Last active
March 9, 2023 11:07
-
-
Save adojos/30ca817c6ba04f8d3c05c8f7facddb31 to your computer and use it in GitHub Desktop.
Java: Concatenate Strings Using StringBuilder.append() #java
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
private static void usingStringBuilder() { | |
String string1 = "Hello "; | |
String string2 = "World"; | |
StringBuilder result = new StringBuilder(); | |
result.append(string1); | |
result.append(string2); | |
System.out.println(result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment