I read in a book that we should when not sure of size of string or during concatenation, it would be better if we must use StringBuffers. For example if we were adding two strings
String a="Hello"; String b="World"; //instead of using a=a+b or a=a+"World", where we have declared a as a //string, we should have declared a as a type of StringBuffer and then //should have called the a.append("WOrld") function.
Remeber that Strings are Immutable, that means once they are created they cannot be changed, however for our convenience, java makes strings into stringbuffers when we perform concatination. Eventough we are using strings, back there its actually stringbuffers. so why not use stringbuffers instead. Apart from that if you have a look at the various methods inside the stringbuffer class you would definately see that it is always better to use a stringbuffer when you are making lot of changes to a string.