Why string objects are immutable and string buffer objects are mutable?

Showing Answers 1 - 1 of 1 Answers

madhukar

  • Mar 28th, 2006
 

once string object is created we can not change the value means its content,if want make changes a new string object is creted,old object will be garbagecollected for certain amount of time,so java soft people think why can we add the con tent its end of the string instead of create new once so they designed StringBuffer

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions