//PROGRAM 11-23 class DemoCapacityLength { public static void main(String[] args) { StringBuffer sb = new StringBuffer("Java"); System.out.println("Kapasitas karakter: " + sb.capacity()); System.out.println("Ruang yang telah diisi string: " + sb.length()); } }