What is StringBuffer in Java?
Java String Handling
StringBuffer in Java:
It is a peer class of String that provides much of the functionality of the strings.
It is mutable in nature.
It may have characters and substrings inserted in the middle or appended to the end.
It is safe, since multiple threads as they are synchronised.
String represents fixed-length, immutable character sequence but StringBuffer represents growable and writeable character sequence.
Constructors used in StringBuffer: