Why String is Immutable?
This is one of the most popular interview questions. In this blog, we are going to talk about it and find the answer. String is one of the most used Class in any Application. For storing the username, password, address, IP address etc, we need to create String objects. So it is necessary to understand why our most famous and used Class is Immutable.
First of all let’s see what Immutable means: