Http://www.cnblogs.com/springcsc/archive/2009/12/03/1616330.html
Note:
The StringBuffer class, like String, is also used to represent strings, except that because the StringBuffer is implemented in a different way than string, the StringBuffer does not generate a new object when string processing occurs. The memory usage is superior to the string class.
So in the actual use, if you often need to modify a string, such as inserting, deleting and so on, use StringBuffer to be more appropriate.
There are many methods in the StringBuffer class that are the same as the string class, which are functionally identical to the functions in the string class.
One of the most notable differences, however, is that each modification of a StringBuffer object alters the object itself, which is the biggest difference from the string class.
The StringBuffer class does not have an inheritance relationship with the string class and cannot be strongly turned.
[Java] StringBuffer class