如果我做:
StringBuilder sb = new StringBuilder();
sb.append("somestring" + "hello" + "more strings" + "last one");
是否与以下内容相同:
string s = "somestring";
s + "hello" + "more strings" + "last one";
它会使使用字符串生成器毫无意义吗?从而需要使用:
StringBuilder sb = new StringBuilder();
sb.append("somestring");
sb.append("hello");
sb.append("more strings");
sb.append("last one");