< prev index next >

src/java.base/share/classes/java/lang/StringBuilder.java

Print this page

        

*** 86,95 **** --- 86,96 ---- extends AbstractStringBuilder implements java.io.Serializable, Comparable<StringBuilder>, CharSequence { /** use serialVersionUID for interoperability */ + @java.io.Serial static final long serialVersionUID = 4383685877147921099L; /** * Constructs a string builder with no characters in it and an * initial capacity of 16 characters.
*** 456,465 **** --- 457,467 ---- * string builder ({@code char[]}). The length of the * {@code char} array may be greater than the number of * characters currently stored in the string builder, in which * case extra characters are ignored. */ + @java.io.Serial private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { s.defaultWriteObject(); s.writeInt(count); char[] val = new char[capacity()];
*** 473,482 **** --- 475,485 ---- /** * readObject is called to restore the state of the StringBuffer from * a stream. */ + @java.io.Serial private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { s.defaultReadObject(); count = s.readInt(); char[] val = (char[]) s.readObject();
< prev index next >