Why is String final in Java?
- by Alex
From when I learned that the class java.lang.String is declared as final in Java, I was wondering why is that? I didn't find any answer back then, but this post: How to create a replica of String class in Java? reminded me of my query.
Sure, String provides all the functionality I ever needed, and never thought of any operation that would require an extension of class String, but still you'll never know what someone might need!
So, does anyone know what was the intent of the designers when they decided to make it final?
See also: Why is String a sealed class in C#?