摘要: public String substring(int beginIndex,int length)。 返回一个新字符串,它是此字符串的一个子字符串。该子字符串从指定的 beginIndex 处开始, length:表示子字符串的长度。 参数: beginIndex - 开始处的索引(包括)。 endindex 结尾处索引(不包括)。 返回: 指定的子字符串。 示例: String str = "ABCDEF";String str1 = str.substring(2, 4); 返回 CD 阅读全文
posted @ 2014-02-22 19:39 Mr_Clint 阅读(220) 评论(0) 推荐(0)
摘要: public class StringTest {public static void main(String[] args) {StringBuffer i = new StringBuffer("abc");String j = i.reverse().toString();System.out.println(j); }} 阅读全文
posted @ 2014-02-22 10:55 Mr_Clint 阅读(236) 评论(0) 推荐(0)