mathew wrote:
> Yes, it becomes cheaper to turn a String into a StringBuffer, use
> append, and convert it back, than to do a simple String + operation.
> Which is surprising to many, so much so that there are lots of
> articles for Java developers trying to explain it. e.g.
> <URL:http://www.javaworld.com/javaworld/jw-03-2000/jw-0324-javaperf.html>

This is not true. Java's String + is optimized by the compiler into 
exactly the same use of a StringBuffer you'd enter normally by hand, 
including multiple + appends. The only place explicitly creating a 
StringBuffer ahead of time saves you is when you're doing multiple 
appends in a loop or on conditions.

-- 
Charles Oliver Nutter, JRuby Core Developer
headius / headius.com -- charles.o.nutter / sun.com
Blogging at headius.blogspot.com