Question: what are the major difference between string and stringbuffer class?
Answer: The main difference between String and StringBuffer is String is immutable while StringBuffer is mutable means you can modify a StringBuffer object once you created it without creating any new object.