This content has been marked as final. Show 4 replies
A forum search, simply on the word "immutable" yields the following:
I happen to see more than 50 results there.
Glance through those results and perhaps you can get an answer to your question.
user8729783 wrote:That fact that it is final is not exactly the same as it being immutable; it means you can't further extend it. And that is likely because String has special handling in the JVM and the language itself, it is not a class like all other classes.
Comparing with c, c++ in java why String class is declared as final ?
Could anybody please describe this one.
But "why" questions can only really be answered by the original designers who made it up all those long years ago. You're not going to get a response from them in this forum.