Does String concatenation get optimized to use existing StringBuilders? – stackoverflow.com

I have the following code: StringBuilder str = new StringBuilder("foo"); for(Field f : fields){ str.append("|" + f); } str.append("|" + bar); String result = str.toString(); I know compile will ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "Does String concatenation get optimized to use existing StringBuilders? – stackoverflow.com"