GnuDeveloper.com

Difference between String, StringBuffer, StringBuilder

String object is immutable means for each update operation internally java creates new object.
StringBuffer/StringBuilder objects are mutable means updating values are more efficient hence increase performance.
StringBuffer is synchronized means it is thread safe
StringBuilder is not synchronized hence carefull in using multi thread environment
Ex:
Mostly all page controller will have common method for execution Hence carefull in using global variable.

Groups: