StringBuilder s1 = new StringBuilder(); s1.append("panzidong");
s1.insert(,"hong,");
s1.replace(,,"!");
s1.reverse(); System.out.println(s1);
System.out.println(s1);
System.out.println(s1.length());
System.out.println(s1.capacity());
s1.setLength();
System.out.println(s1);
output:
gnodiznap!gnoh
gnodiznap!gnoh gnod