// interconverting StringBuffer and String StringBuffer sb; String s; sb = new StringBuffer( s ); s = new String( sb ); s = sb.toString(); // interconverting StringBuilder and String StringBuilder builder; String s; builder = new StringBuilder( s ); s = new String( builder ); s = builder.toString();