String : once you define a string its content cannot be manipulated
StringBuffer : But in StringBuffer we can manipulate the content, i.e we can append the character at the end or middle of the content
Java provides the StringBuffer and String classes, and the String class is used to manipulate character strings that cannot be changed. Simply stated, objects of type String are read only and immutable. The StringBuffer class is used to represent characters that can be modified.
The significant performance difference between these two classes is that StringBuffer is faster than String when performing simple concatenations. In String manipulation code, character strings are routinely concatenated.