这两行有什么区别?StringBuilder追加vs +
stringBuilder.append("Text " + counter + " more text");
stringBuilder.append("Text ").append(counter).append(" more text");
假设计数器的递增INT,并在第一行创建一个字符串"Text 0 more text"
,"Text 1 more text"
,每次它的名字,而第二行创建只有这两个字符串一次时间等:"Text "
和" more text"
?它是否正确?