
public class UseString
{
    public static void main(String[] args)
    {
       String s1 = "Hello 123";    // Create the first string
       String s2 = " Good-bye ";    // Create the second string

       int    x;
       char   c;
       String result;

       x = s1.length();  // the length of string s1
       x = s2.length();  // the length of string s2

       c = s1.charAt(1); // the char at pos 1 in string s1
       c = s2.charAt(1); // the char at pos 1 in string s2
       
       result = s1.toUpperCase(); // string s1 in uppercase
       result = s2.toUpperCase(); // string s2 in uppercase

       result = s1.concat(s2); // String s1 concatenated with string s2
       result = s2.concat(s1); // String s2 concatenated with string s1

       result = s2.trim(); // remove spaces before and after string s2
    }
}
