Question: what is the difference between the string and stringbuffer classes?
Answer: String and StringBuffer both are the classes which operate on strings. StringBuffer class is the peer class of the class String. ... The basic difference between String and StringBuffer is that the object of the “String” class is immutable. The object of the class “StringBuffer” mutable.