Why string class is immutable in java

Give me correct answer with real time example it's very Argent to me

Your Answer

String class is FINAL it mean you can't create any class to inherit it and change the basic structure and make the Sting mutable.
Another thing instance variable and methods of String class that are provided are such that you can't change String object once created.

-1
Core Java

Didn't get the answer.
Contact people of Talent-Core Java directly by clicking here