String a = "abc";
String B = "abc";
a==b;//returns True because A, B points to the same address
String a = new string ("abc");
String b = new String ("abc");
a==b;//returns false because A, B does not point to the same address
------------------------------------------------------------
A = "abc def";
b = "abc Def";
A.charat (2);//Find the character labeled 2
A.compareto ("ABC");//And the string is larger than the size until one character is not the same
A.concat ("Ghi");//a = a + "GHI"; same effect
A.endswith ("def");//Determine whether to end with Def
A.startwith ("abc");//Determine whether to start with ABC
A.contains ("abc");//Determine if ABC is included
A.equals (b);//Determine whether the contents of a and B strings are equal
A.indexof ("C");//Determine where "C" first appears
A.lastindexof ("C");//Determine the location of the last occurrence of "C"
A.indexof ("C", 2);//Judging from the subscript 2 of the character start, the first occurrence of "C" position
A.length (); Length of//a
A.replace (' C ', ' a ');//Replace "a" with "C" in the string
string[] arr = A.split ("");//string is divided into arrays with spaces
A.substring (3);//start output from subscript 3 until the end
A.substring (3,5);//Output subscript 3 to 5 characters
A.tolowercase ();//change the string to lowercase
A.touppercase ();//Capitalize the string
Java String Common Methods collection