Java删除StringBuilder最后一个逗号

//删除StringBuilder最后一个逗号
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("123,");
stringBuilder.deleteCharAt(stringBuilder.length()-1);
System.out.println(stringBuilder.toString());

你可能感兴趣的:(Java,java,开发语言)