Pregunta de entrevista de Lowe's Home Improvement

Why String is Immutable in java

Respuesta de la entrevista

Anónimo

19 oct 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