import javax.swing.*;

public class StringBufferAppend
{
 public static void main(String args[])
  {
	 Object o = "hello";
	 String s = "Good bye";
	 char charArray[] = {'a', 'b', 'c', 'd', 'e','f'};
	 boolean b = true;
	 char c = 'Z';
	 int i = 7;
	 long l = 10000000;
	 float f = 2.5f;
	 double d = 33.333;
	 StringBuffer buffer = new StringBuffer();

	 buffer.append(o);
	 buffer.append(" ");
	 buffer.append(s);
	 buffer.append(" ");
	 buffer.append(charArray);
	 buffer.append(" ");
	 buffer.append(charArray,0,3);
	 buffer.append(" ");
	 buffer.append(b);
	 buffer.append(" ");
	 buffer.append(c);
	 buffer.append(" ");
	 buffer.append(i);
	 buffer.append(" ");
	 buffer.append(l);
	 buffer.append(" ");
	 buffer.append(f);
	 buffer.append(" ");
	 buffer.append(d);

	 JOptionPane.showMessageDialog(null,
	  "buffer = " + buffer.toString(),
	  "Demonstrating StringBuffer append Methods",
	  JOptionPane.INFORMATION_MESSAGE);

	  System.exit(0);
   }
}
