Question d’entretien chez Capgemini

difference between string & string builder.

Réponse à la question d'entretien

Utilisateur anonyme

30 nov. 2018

String is immutable ie, if you try to update it than it will create a new object. Its not thread safe too. String builder is used for updating a string throughout. Its mutable and if you are using single thread than its preferable.