Why is string immutable in java
Let’s learn why is string immutable in java. Why is string immutable in java String is immutable in java because String objects are cached in string constant pool. String object once created cannot be changed i.e, when object is assigned to variable we cannot update the reference. If string object is changed then it creates…
Read More Why is string immutable in java