Login
Remember
Register
CodersEditor Q&A
Online IDE
Questions
Unanswered
Tags
Users
Ask a Question
Programming Tutorials
Ask a Question
Why Java Strings are immutable in nature?
0
votes
asked
Jan 19, 2021
by
abitha
(
1.6k
points)
java
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 19, 2021
by
PreethiSadhish
(
524
points)
selected
Jan 22, 2021
by
abitha
Best answer
Because Java uses the String literals. If one reference of an object changes then all other references will be affected. This is why string is immutable in java.
Please
log in
or
register
to add a comment.
Welcome to CodersEditor Q&A, where you can ask questions and receive answers from other members of the community.
239
questions
203
answers
2
comments
692
users
Related questions
Why pointers are not used in Java?
Why pointers are not used in Java?
Why the main method is static in java?
What are constructors in Java?
What are wrapper classes in Java?
...