employer cover photo

Distinct Infotech Solutions

Questa è la tua azienda?

Domanda di colloquio di Distinct Infotech Solutions

what are the differences between string and StringBuilder ?

Risposta di colloquio

Anonimo

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