Browse - Programming Tips - How can I clear (make empty) a StringBuilder?

Date: 2014oct4
Language: Java

Q.  How can I clear (make empty) a StringBuilder?

A.  Do this:

sb.setLength(0);