String is immutable.it is true
String can be change to mutable How?
Answer Posted / sharief
Yes,String is immutable.The simple meaning of immutable is
unmodifiable or unchangeable.once String object has been
created,its value can not be changed.
The Reason is java uses concept of String literal.Suppose
there are 5 reference variables,all referring to an object
called "Ronaldo".If one reference variable changes the value
of the object,it will be affected to all the reference
variables.That is why String objects are immutable in java.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Write a program to show synchronization?
What is glasgow?
If I wanted to use a solarisui for just a jtabbedpane, and the metal ui for everything else, how would I do that?
What is the difference between the string and stringbuffer classes?
What is a sessionfactory? Is it a thread-safe object?
If your ui seems to freeze periodically, what might be a likely reason?
What is the relationship between the canvas class and the graphics class?
Why is string immutable in java?
Can constructors be synchronized in java?
What is the purpose of the notify() method?
What are the difference between RMI and CORBA?
What is scalable, portability in the view of J2EE?
What is the highest-level event class of the event-delegation model?
which book is better for jdbc ,servlets and jsp
Java is fully object oriented languages or not?