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
What is a clone?
Difference between new operator and class.forname().newinstance()?
How database connectivity in XML is achieved?
What are the different class loaders used by jvm?
Is there a guarantee of uniqueness for entity beans?
What class is the top of the awt event hierarchy?
Why do I get a duplicate name error when loading a jar file?
What is ioc concept & explain it?
In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?
When is the best time to validate input?
What modifiers may be used with an interface declaration?
Difference between swing and awt?
What event results from the clicking of a button?
To what value is a variable of the string type automatically initialized?
What do you need to set-up a cluster with jboss?