+1 vote
in JAVA by
Why are strings immutable in Java?

1 Answer

0 votes
by

Why are strings immutable in Java?

Strings in java are frequently used for hashmap keys. Now if someone changes the value of the string it will cause severe discrepancies. Hence strings are made immutable.

...