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


Please Help Members By Posting Answers For Below Questions

Write a program to show synchronization?

694


What is glasgow?

586


If I wanted to use a solarisui for just a jtabbedpane, and the metal ui for everything else, how would I do that?

572


What is the difference between the string and stringbuffer classes?

546


What is a sessionfactory? Is it a thread-safe object?

685






If your ui seems to freeze periodically, what might be a likely reason?

549


What is the relationship between the canvas class and the graphics class?

544


Why is string immutable in java?

581


Can constructors be synchronized in java?

621


What is the purpose of the notify() method?

600


What are the difference between RMI and CORBA?

623


What is scalable, portability in the view of J2EE?

1879


What is the highest-level event class of the event-delegation model?

576


which book is better for jdbc ,servlets and jsp

1648


Java is fully object oriented languages or not?

542