String is immutable.it is true
String can be change to mutable How?

Answer Posted / prathap

Because of String pooling String is immutable. Using StringBuffer we can change it as mutable. i.e.,This string literal reference is assaigened to StringBuffer object
Eg : String s="java";
     StringBuffer sb= new StringBuffer(s);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

To what value is a variable of the string type automatically initialized?

617


the same information whether it will connect to the database or it will be used previous information?

579


What is the purpose of the wait() method?

625


How are commas used in the intialization and iteration parts of a for statement?

591


What is the relation between the infobus and rmi?

562






Explain phantom read?

1742


Difference between swing and awt?

614


What is an abstract method?

596


What is clustering? What are the different algorithms used for clustering?

586


Is the infobus client side only?

617


Which container method is used to cause a container to be laid out and redisplayed?

671


whats is statement and procedure

1597


Why are some of the class and element names counter-intuitive?

577


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

552


Why do threads block on i/o?

688