We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18f63d2 commit c899ca6Copy full SHA for c899ca6
1 file changed
strings/ConcatenateStrings.java
@@ -0,0 +1,17 @@
1
+package com.zetcode;
2
+
3
+public class ConcatenateStrings {
4
5
+ public static void main(String[] args) {
6
7
+ System.out.println("Return" + " of " + "the king.");
8
+ System.out.println("Return".concat(" of ").concat("the king."));
9
10
+ StringBuilder sb = new StringBuilder();
11
+ sb.append("Return");
12
+ sb.append(" of ");
13
+ sb.append("the king.");
14
15
+ System.out.println(sb);
16
+ }
17
+}
0 commit comments