public class StringBufferSubStringTest {
public static void main(String[] args) {
StringBuffer sb = new StringBuffer();
sb.append("张三,");
sb.append("张三1,");
sb.append("张三2,");
System.out.println(sb.substring(0,sb.length()-1));
}
}
输出
张三,张三1,张三2
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)