You are here : Home » knowledge exchange
The costs of Strings: Avoid using '+' operator for concatenating no. of Strings.... The String concatenation operator + looks good and easy but this involves: new StringBuffer is created, the two arguments are added to it with append(), and the final result is converted back with a toString(). This costs both space and time. In particular, if you're appending more than one String, consider using a StringBuffer directly instead.


Copyright © 2005-2012 Narola Infotech, Custom Software & Website Development Company | All Rights Reserved.