View Single Post
Old 02-26-2018, 03:04 AM   #6
samaron
Registered User
 
Join Date: Sep 2017
Posts: 177
String is a very core class in Java, many things rely on it working a certain way, for example being immutable. Making the class final prevents subclasses that could break these assumptions. Note that, even now, if you use reflection, you can break Strings (change their value or hashcode).
samaron is offline   Reply With Quote