Frage im Vorstellungsgespräch bei Mindfire Solutions

why string immutable

Antwort im Vorstellungsgespräch

Anonym

3. Juni 2019

strings immutable because. If somebody modifies the string he's creating a new string object, leaving the old one alone. every time we assign a new value to string it will create a new instance. advantages: thread safe.

1