Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
String string = "abc" + "def";
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
String string = "abc";
|
||||
string += "def";
|
||||
|
|
@ -0,0 +1 @@
|
|||
String string = "abc".concat("def");
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
StringBuilder string = new StringBuilder();
|
||||
string.append("abc").append("def");
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
StringBuilder string = new StringBuilder();
|
||||
string.append("abc");
|
||||
string.insert(3, "def");
|
||||
|
|
@ -0,0 +1 @@
|
|||
String string = String.format("%s%s", "abc", "def");
|
||||
|
|
@ -0,0 +1 @@
|
|||
String string = "%s%s".formatted("abc", "def");
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
public class Str{
|
||||
public static void main(String[] args){
|
||||
String s = "hello";
|
||||
System.out.println(s + " literal");
|
||||
String s2 = s + " literal";
|
||||
System.out.println(s2);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue