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

Can we sent objects using Sockets?

638


How will you pass parameters in RMI? Why do you serialize?

684


What is the immediate superclass of the applet class?

591


What is jboss?

569


What do you know about seam?

591






What is the relationship between an event-listener interface and an event-adapter class?

549


Java is fully object oriented languages or not?

531


Is jvm a overhead?

616


Describe activation process?

2054


What is the difference between ear, jar and war file?

561


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

535


What is in-memory replication?

550


How would you detect a keypress in a jcombobox?

667


What modifiers may be used with an inner class that is a member of an outer class?

567


What if the static modifier is removed from the signature of the main method?

696