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

In RMI, inorder to sent the stub reference to the client, is we have to load the server object first into the memory or can we directly sent reference to the client?

1568


What restrictions are placed on the values of each case of a switch statement?

545


Why a component architecture for the java platform?

588


Which containers use a border layout as their default layout?

618


What is TL and its use?

1999






Is the infobus client side only?

623


What is a class loader? What are the different class loaders used by jvm?

593


What is in-memory replication?

567


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

580


What is a modular application?

604


What are various types of class loaders used by jvm?

504


What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

594


Why use POJO when I can use hashmap

2058


Is infobus easy to use?

607


What is the difference between a menuitem and a checkboxmenuitem?

597