Create an array of characters
Char[] Chararr = {' A ', ' B ', ' C ', ' d ', ' e ', ' f ', ' G '};
Create a string
String str = new string (Chararr);
System.out.println (str);
String aStr = "ABCDEFG";
Comparison of strings
Boolean results = Str.equals (ASTR);
SYSTEM.OUT.PRINTLN (results);
or the character to which the index is located
char ch = str.charat (3);
SYSTEM.OUT.PRINTLN (CH);
Or the index of the character
int index = Str.indexof ("a");
SYSTEM.OUT.PRINTLN (index);
Get a partial string of strings
char[] Charr = new CHAR[10];
Str.getchars (1,3,charr,0);
System.out.println (Charr);
Intercept string
String subStr = str.substring (2);
System.out.println (SUBSTR);
Concatenation of strings
String string1 = "I am string1";
String string2 = "I am string2";
String superstr = String1.concat (string2);
System.out.println (SUPERSTR);
Implementing string-Case conversions
String lowstr = "Abcdefghijklmnopqrstuvwsyz";
String upstr = Lowstr.touppercase ();
System.out.println (UPSTR);
System.out.println (Upstr.tolowercase ());
Remove the spaces at the beginning and end of the character
String trimstr = "I am a string";
System.out.println (Trimstr.trim ());
Convert any type to a string type
TestString test = new teststring ();
String teststr = test.tostring ();
System.out.println (TESTSTR);
Manipulation of strings in Java