CapacityTest.java
public class CapacityTest{
public static void main(String[] args){
String buffer sb=new StringBuffer(10);
sb.append("this is a a");
System.out.println(sb.capacity());
System.out.println(sb.length());
}
}
public static void main(String[] args){
String buffer sb=new StringBuffer(10);
sb.append("this is a a");
System.out.println(sb.capacity());
System.out.println(sb.length());
}
}