StringBuilder &&StringBuffer删除最后一个字符的方法
StringBuffer sb = new StringBuffer("dfdsfads,s");
sb.deleteCharAt(sb.length()-1);
System.out.println(sb);
ps:注意 Junit测试的方法 需要满足 public void 和无参数!!!!
StringBuffer sb = new StringBuffer("dfdsfads,s");
sb.deleteCharAt(sb.length()-1);
System.out.println(sb);