1

why String is immutable or final in java?
Some say because it easy to use immutable string but they try to fail to enplane it.
some say for security reason.
but i can't find the logic behind this.

gifpif
  • 4,507
  • 4
  • 31
  • 45
  • 2
    You may have to ask to James Gosling! – Paul Vargas May 30 '13 at 05:01
  • 1
    I believe @Pawan Mishra want to know **why** we make something like String immutable, not just what immutable means. – WoooHaaaa May 30 '13 at 05:03
  • @MrROY that's explained in the other possible duplicate question. – Luiggi Mendoza May 30 '13 at 05:04
  • @MrROY exactly here i want to know **why** string is immutable in java. not the working behind the string manipulation. – gifpif May 30 '13 at 05:41
  • @LuiggiMendoza Sir i read all the answer of duplicate question but all answer is about the meaning of immutable or implementation of string manipulation. – gifpif May 30 '13 at 05:46
  • 1
    There are lot of explanations here on SO. Just another link after visiting those two: http://stackoverflow.com/q/3407403/1065197. Really, you should do some investigation first. – Luiggi Mendoza May 30 '13 at 05:48

0 Answers0