public static String concat(Iterableiterable) { StringBuffer buffer = new StringBuffer(); for (String string : iterable) { buffer.append(string); } return buffer.toString(); }
Monday, March 22, 2010
StringBuffers that exist within a method
This won't be the biggest performance hit of all time, but no one seems to use a Vector when an ArrayList is sufficient. StringBuffer was released before StringBuilder, and old habits die hard.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment