//PROGRAM 11-26 class DemoSetLength { public static void main(String[] args) { StringBuffer sb = new StringBuffer("Pemrograman Java"); System.out.println("Sebelum diset"); System.out.println("sb : " + sb); System.out.println("Lebar : " + sb.length()); sb.setLength(11); System.out.println("\nSetelah diset"); System.out.println("sb : " + sb); System.out.println("Lebar : " + sb.length()); } }