私は実装を見直しJava.lang.String
ました。コンストラクターは私を混乱させます。直接使用できる
理由。
3人の所有物は私的なものです!!!result.value,result.count,result.offset
/** The value is used for character storage. */
private final char value[];
/** The offset is the first index of the storage that is used. */
private final int offset;
/** The count is the number of characters in the String. */
private final int count;
public String(StringBuilder builder) {
String result = builder.toString();
this.value = result.value;
this.count = result.count;
this.offset = result.offset;
}