An immutable class should be declared final to avoid extensibility. However, developers need to extend the String class in order to add more features, and this limitation can be considered a drawback of immutability.
Nevertheless, developers can write utility classes (for example, Apache Commons Lang, StringUtils, Spring Framework, StringUtils, Guava, and strings) to provide extra features and simply pass strings as arguments to the methods of these classes.