Greg Nudelman wrote:
Just to add 2 cents more: here is another shortcut when you have to just use the StringBuffer in-place:
String myString = new StringBuffer().append("Something").append("Something Else").toString();
This one is best used for things like long dynamic SQL statements, etc. where you don't append in the loop, but still have a fair amount of the String objects to add.
That would be exactlty analagous to using + to concatenate, as in:

String myString = "Something" + "Something Else";

If you are doing everything in a single statement, just might just as well
use + over StringBuffer.


____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to