In response to the reply on using a StringBuffer instead of a '+' operator,
Why not use the concat(String str) method in the String Object api?
This would work the same, no?
String a="";
for(int i=0;i<20000;i++){
a = a.concat(i);
}
Please let me know which is better. I am a little curious now. Or is it
that a '+' operator and a concat method are exactly the same as in your
code1 example and the code2 example it still the better choice?