You should have searched a little bit about this.
Anyways, when starting to program in java, the best way to know what you can do with java in-built objects is to go to the javadoc of that class and there you will get to know plenty of thing.
In your case, you'll find your answer here : StringBuilder javadoc
Use replace method.