Inserting Characters
public class MainClass { public static void main(String[] args) { StringBuffer sb1 = new StringBuffer("xy"); System.out.println(sb1); sb1.insert(0, false); System.out.println(sb1); StringBuffer sb2 = new StringBuffer("xy"); System.out.println(sb2); sb2.insert(1, true); System.out.println(sb2); } }