public String(byte[] bytes):把字节数组转换成一个字符串
public String(byte[] bytes,int index,int length):把字节数组从index下标开始到length个元素转换成字符串
public String(char[] value):把一个字符数组转换成一个字符串
public String(char[] value,int index,int count):把一个字符数组从index下标处开始的count个字符转换成字符串
public String(String original):把一个字符串转换成一个字符串
public boolean equals(Object obj):比较字符串是否相等,比较的是内容,区分大小写
public boolean equalsIgnoreCase(String str):比较字符串是否相等,比较的是内容,不去分大小写
public boolean contains(String str):判断一个字符串是否包含str字符串
public boolean startsWith(String str):判断一个字符串是否以str这个字符串开始
public boolean endsWith(String str):判断一个字符串是否以str这个字符串结尾
public boolean isEmpty():判断一个字符串是不是空串
public int length():获取一个字符串的长度
public char charAt(int index):查找一个字符串中对应索引的字符
public int indexOf(int ch):返回指定字符在次字符串中第一次出现的索引
public int indexOf(String str):查找一个字符串第一个字符出现时的索引
public int indexOf(int ch,int fromIndex):返回指定字符在此字符串中从指定位置后第一次出现的索引
public int indexOf(String str,int fromIndex):查找一个字符串中字符第fromIndex次出现的索引
public String substring(int start):从指定位置开始截取字符串,默认到末尾
public String substring(int start,int end):从指定位置开始开始带指定位置结束截取字符串
public byte[] getBytes():把字符串转换为字节数组
public char[] toCharArray():把字符串转换为字符数组
public static String valueOf(char[] ch):把字符数组转换为字符串
public static String valueOf(int i):把int类型的数据转换为字符串
public String toLowerCase():把字符串转换为小写
public String toUpperCase():把字符串转为大写
public String concat(String str):把字符串拼接
public String replace(char old,char new):将指定字符进行互换
public String replace(String old,String new):将指定字符串进行互换
public String trim():去除字符串两端的空格
public int compareTo(String str):对照ASCII码表,从第一个字母进行减法运算,返回该减法的结果
public int compareToIgnoreCase(String str):不区分大小写返回减法的结果