public class Main{
public static void main(String[] args)
{
String str="Mad Thursday,V Me";
int number=50;
String result=str+" "+number;
System.out.println(result);
//length() :返回字符串长度
int len=str.length();
System.out.println(len);
//charAt(int index):返回指定索引处的字符,索引从0开始
char c=str.charAt(1);
System.out.println(c);
//substring(int beginIndex,int endIndex):返回从beginIndex开始到endIndex结束的子字符串
String str2=result.substring(15,16);
System.out.println(str2);
//indexOf(String str):返回字符串中首次出现指定子字符串的索引,若找不到则返回-1
int index=result.indexOf("50");
System.out.println(index);
//toUpperCase()字符串全转大写 toLowerCase()字符串全转小写
String str3=result.toUpperCase();
String str4=result.toLowerCase();
System.out.println(str3);
System.out.println(str4);
}
}