1.如果后面不用了,直接赋值为null; 2.如果后面还要用的话,就sb.delete(0,sb.length-1); 或者:sb.replace(0,sb.length-1,""); 或者:sb.setLength(0);