[From StringBuffer] ''This really blows my mind. Everywhere, everywhere, everywhere, I see Java literature advising me to use StringBuffer''''''s everywhere because they're "much faster". Just this week, I saw it in a "performance tips" column. TogetherSoft IDE has a code audit facility that flags string concatenations as a potential performance problem. I actually performed the compilation / disassembly myself because I couldn't believe that so many Java experts could be so wrong. What do you know. They're wrong.'' ''Moral of the story: Java experts are all sheep. The emperor has no clothes.'' ---- The other tests here (by LukeGorrie and WayneConrad on StringBufferExample and StringBuffer respectively) have decompiled Java classes. I just wrote a timer. But I ''did'' compare doing concatenation in loops and in methods. My test seems to indicate that the StringBuffer method is always faster. I did this test using JDK1.4 on Win2000. Am I missing something? public class StringA''''''ppendTest { private int numberOfRepetitions; static final String string = "One"; public StringA''''''ppendTest(int numberOfRepetitions) { this.numberOfRepetitions = numberOfRepetitions; } public void timingInLoops() { Stop''''''Watch plusAppendingWatch = new Stop''''''Watch(); Stop''''''Watch bufferAppendingWatch = new Stop''''''Watch(); plusAppendingWatch.start(); String plusAppended = new String(""); for (int i=0; i