StringBuffer stringBuffer=new StringBuffer (); stringBuffer.append("aaa,"); stringBuffer.deleteCharAt(stringBuffer.length() - 1);