Interview Question
Qus: Difference between String and StringBuilder?
A string is immutable means you cannot change it after it was created. Any operation that appears to change the string instead returns a new instance whereas when you need a mutable string, such as where you need to change lots of things, you use a StringBuilder which is a buffer of characters that can be changed.
Answers (2)