Colour me stupid, but in the article it gives this code as having some horrible hard to find bug:<p><pre><code> String s = "";
for (int i = 0; i < args.length; i++) {
s += array[i];
}
</code></pre>
Now, as soon as I looked at that I immediately thought "well, they're not putting anything in between the params when they concatenate them", e.g. I would expect to see:<p><pre><code> s += array[i] + "\t";
</code></pre>
(or a comma or newline instead of a tab)<p>My next thought was "what happens if there are no args?" E.g. args.length returns 0, and they try to access the first element in the list (due to heritage from c pointers we start counting at 0) which is the 'zeroth' one, which doesn't exist... it should throw an array out of bounds exception.<p>-----<p>The reason I ask, is that based on the comments, the people reading the blog think the problem is in the operator overloading. Are they expecting this iteration through the args list to <i>sum</i> the args, and then assign the sum to the string?<p>If so, then I don't see how the bug could remain undetected:<p><i>"it could take weeks to get a bug report, and weeks more to get a fix ready"</i><p>Whereas in the unlikey event that I'm right, I <i>still</i> don't see how it would be hard to fix?<p>What am I missing?