Give me correct answer with real time example it's very Argent to me
String is immutable because the it increases the security from hacking like not allowing to change the sensitive data like changing username, password. It is also useful to perform multi threading and we don't need to synchronise. It is also used for string pooling.