4 ms·
Why should the manually managing your stringbuilders be preferable to having the compiler do it for you? The example given is: String result = foo() + arg;
by jbert 13y ago
Why should the manually managing your stringbuilders be preferable to having the compiler do it for you? The example given is:
String result = foo() + arg;
result += boo();
System.out.println(“result = “ + result);
creates 3 StringBuilders. I would have thought that it wouldn't be particularly hard to track that the input to subsequent "+" was the output of a previous stringbuilder, allowing easy re-use?