标签:pre bsp 字符串反转 bcd static 截取 ever pen logs
1 /** 2 * java常见字符串的操作 3 */ 4 public class Test7 { 5 public static void main(String args[]){ 6 StringBuffer sBuffer = new StringBuffer("ABCDEF"); 7 sBuffer.append("abcdef"); 8 sBuffer.append(".123"); 9 sBuffer.append(".456"); 10 System.out.println(sBuffer);//原始字符串 ABCDEFabcdef.123.456 11 System.out.println(sBuffer.delete(0,5));//字符串截取 Fabcdef.123.456 12 System.out.println(sBuffer.reverse());//字符串反转 654.321.fedcbaF 13 } 14 }
标签:pre bsp 字符串反转 bcd static 截取 ever pen logs
原文地址:http://www.cnblogs.com/719907411hl/p/7094640.html