employer cover photo

Distinct Infotech Solutions

Ist dies Ihr Unternehmen?

Frage im Vorstellungsgespräch bei Distinct Infotech Solutions

what are the differences between string and StringBuilder ?

Antwort im Vorstellungsgespräch

Anonym

16. Feb. 2022

String is immutable, Immutable means if you create string object then you cannot modify it and It always create new object of string type in memory. StringBuilder is mutable, means if create string builder object then you can perform any operation like insert, replace or append without creating new instance for every time.it will update string at one place in memory doesnt create new space in memory