Pergunta de entrevista da empresa TIAA

What is string in java and reason for its immutability.

Resposta da entrevista

Sigiloso

18 de fev. 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.