* The string class is immutable, and any modification to a string causes the new object to be generated.
* StringBuffer and StringBuilder are mutable classes, and any changes to the string do not produce new objects.
When used in practice, if you often need to modify a string, such as inserting, deleting, etc.
* But what's the difference between StringBuffer and StringBuilder?
StringBuffer is thread-safe and easy to use in multithreaded programs, but the program is less efficient.
StringBuilder is not thread-safe and is more efficient than stringbuffer in a single thread.
* Overall, the three operating time:
String > StringBuffer > StringBuilder
The above article on the Java string StringBuffer StringBuilder the difference is small series to share all the content of everyone, hope to give you a reference, but also hope that we support the cloud habitat community.