// Book first edition page 243 -- illustrates StringBuffer class public class Money { public static void main (String[] args) { StringBuffer text1 = new StringBuffer (); StringBuffer text2 = new StringBuffer (" m"); StringBuffer text3 = new StringBuffer ("1 dollar"); text1.append (1); text1.append (" p"); text1.append ('e'); text1.append ('n'); text1.append ("ny"); text2.insert (0, 1); text2.insert (2, "di"); text2.insert (5, 'e'); System.out.println (text1); System.out.println (text2); System.out.println (text3); text3.reverse(); System.out.println (text3); } }