String class is made final in Java in order to make the String objects immutable. Making an object immutable helps in two ways:
- Security: the system can hand out sensitive bits of read-only information without worrying that they will be altered
- Performance: immutable data is very useful in making things thread-safe.