<pre name="code" class="java">/**
* A modifiable {@link CharSequence sequence of characters} for use in creating
* strings. This class is intended as a direct replacement of
* {@link StringBuffer} for non-concurrent use; unlike {@code StringBuffer} this
* class is not synchronized.
*
* <p>For particularly complex string-building needs, consider {@link java.util.Formatter}.
*
* <p>The majority of the modification methods on this class return {@code
* this} so that method calls can be chained together. For example:
* {@code new StringBuilder("a").append("b").append("c").toString()}.
*
* @see CharSequence
* @see Appendable
* @see StringBuffer
* @see String
* @see String#format
* @since 1.5
*/
public final class StringBuilder extends AbstractStringBuilder implements
Appendable, CharSequence, Serializable {
private static final long serialVersionUID = 4383685877147921099L;
/**
* Constructs an instance with an initial capacity of {@code 16}. //初始容量16,和StringBuffer一样
*