public class Structer {
public static void main(String[] args) throws Exception{
StringBuffer sb = new StringBuffer(20);
/*String str1=new String();
System.out.println(str1);
System.out.println(str1.capacity());
System.out.println(str1.length());
//str1.append("hello world , my name is ...");*/
System.out.println(sb);
System.out.println(sb.capacity());
System.out.println(sb.length());
StringBuffer sb1 = new StringBuffer("abcd");
System.out.println(sb1);
System.out.println(sb1.capacity());
System.out.println(sb1.length());
char[] charArray=new char[]{'D','E','F','G'};
//StringBuffer sb2=new StringBuffer(char[] charArray);
String str=new String(charArray);
StringBuffer sb2=new StringBuffer();
sb2.append(str);
System.out.println(sb2);
System.out.println(sb2.capacity());
System.out.println(sb2.length());
}
}