Strings are immutable, meaning unchanging, so continually building/adding to a string causes a whole new string to be written to memory. Stringbuilder remedies that problem.

2 Users have rated as useful.
Login to rate this answer.
when you dont want to do operations with string, you should use string class.
Login to rate this answer.
Stings are immutable, so when you are not performing any operations on strings, then use string class.
Login to rate this answer.
This is how I would answer:
1) Strings are immutable and once created, cannot be changed. Hence, strings are best used in cases when you need thread safety and features where strings will not change, such as hash table keys.
1) StringBuilders should be used when you are continuously modifying the character array by deleting, appending characters from the buffer.
Login to rate this answer.
String is immutable, meaning, if there is any change in the string value, run time allocates new memory & assign it to the string reference. For the programmer, it looks like the same string but internally, its a new string. It is better to avoid string and go for String Buffer in case modifications in string call is expected.
Login to rate this answer.