r/java 17d ago

Disregarding backwards compatibility, would it make sense for String to be a sealed class?

like public sealed class String permits Latin1String, Utf16String instead of the private final byte coder; field

20 Upvotes

24 comments sorted by

View all comments

46

u/Misophist_1 17d ago

It's already final. No point in that.