【JDK1.8源码】AbstractStringBuilder、StringBuffer、StringBuilder
AbstractStringBuilder123456789101112/*抽象类 实现两个接口:Appendable和CharSequence Appendable:表明类中序列是可拓展的 CharSequence:只读的字符序列接口*/abstract class AbstractStringBuilder implements Appendable, CharSequencepublic interface Appendable { Appendable append(CharSequence csq) throws IOException; Appendable append(CharSequence csq, int start, int end) throws IOException; Appendable append(char c) throws IOException;}
成员变量12char[] value; //底层是一个可变的字符数组int count; //字符数组中含有的元素
构造器1234567 ...