There could be many possible answers to this question, and only the original developer of the String class can provide the real answer. Below are some possible reasons that make sense:
1) StringPool would not be possible at all without strings being immutable, because if a String object/literal, say “Text”, has been referenced by many other reference variables and it changes value, others wi...
↧