Pregunta de entrevista de TIAA

What is string in java and reason for its immutability.

Respuesta de la entrevista

Anónimo

18 de feb de 2021

String is a final class provided for string operations such as concat, replace, substring, length, etc. The reasons for immutability of the String objects are Security, thread safety(multithread consistency), etc.