SCR里这么写的 super(str.length() + 16);
+16
- /**
- * Constructs a string buffer initialized to the contents of the
- * specified string. The initial capacity of the string buffer is
- * {@code 16} plus the length of the string argument.
- *
- * @param str the initial contents of the buffer.
- */
- public StringBuffer(String str) {
- super(str.length() + 16);
- append(str);
- }
- /**
复制代码
|