//PROGRAM 11-24 class DemoEnsureCapacity1 { public static void main(String[] args) { StringBuffer sb = new StringBuffer(); System.out.println("Kapasitas awal : " + sb.capacity()); // menentukan kapasitas baru sb.ensureCapacity(25); System.out.println("Kapasitas setelah diset : " + sb.capacity()); } }