Discussion :: Strings - General Questions (Q.No.4)
The string built using the String class are immutable (unchangeable), whereas, the ones built- using the StringBuilder class are mutable.
Answer: Option A
No answer description available for this question.
|Vixen said: (May 29, 2011)|
|First in StringBuilder you can only append string, which is only on of many ways how to change it. Second, String builder is much more an array than string itself, ToString method returns any time different instance to string.|
|Nishant said: (Jul 22, 2013)|
|Using System.String class you can create immutable string means that their contents once created cannot be changed.
Using Stringbuilder class you can create the mutable strings.
|Vamsee said: (Nov 19, 2013)|
|Strings are immutable means that when ever you perform operation on them they create a new object every time, where as string builder class will not create multiple objects and performs operations on the same object. This saves lot of memory in terms of creating objects.|
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.