Java examples for Language Basics:StringBuffer
How to remove all values from StringBuffer
public class Main { // w ww .j av a 2 s . co m public static void main(String[] args) { StringBuffer sbf = new StringBuffer("Hello World!"); System.out.println("StringBuffer content: " + sbf) ; sbf.delete(0, sbf.length()); System.out.println("StringBuffer content after reset:" + sbf); } }