|
You can be assured that the string objects cannot be changed. But what if someone overrides the String class so that the subclass can actually modify the string object? This is one of the main reasons why the String class is declared as final. Because it is final, no one can subclass it and alter its behavior. Thus, the String objects are guaranteed to be always immutable.