Pergunta de entrevista da empresa Lowe's Home Improvement

Why String is Immutable in java

Resposta da entrevista

Sigiloso

19 de out. de 2024

String are immutable because their adress reference are stored in string constant pool and if we try to alter the string then it will became a new string and will store with new adress into string constant pool

1