寻找替换 StringBuilder 内容的最佳(?)方法
我通常用这个
StringBuilder stringBuilder = new StringBuilder("abc");
stringBuilder.setLength(0);
stringBuilder.append("12");
我想也可以指向一个新的 StringBuilder
StringBuilder stringBuilder = new StringBuilder("abc");
stringBuilder = new StringBuilder("12");