title: How to remove last character of string buffer in java?
body: <p>I have following code, I wanted to remove last appended character from <code>StringBuffer</code>:</p>
  
  <pre><code>StringBuffer Att = new StringBuffer();
  BigDecimal qty = m_line.getMovementQty();
  int MMqty = qty.intValue();
  for (int i = 0; i &lt; MMqty;i++){
      Att.append(m_masi.getSerNo(true)).append(",");
  }
  String Ser= Att.toString();
  fieldSerNo.setText(Ser);
  </code></pre>
  
  <p>I want to remove " , " after last value come (After finishing the For loop)</p>