Interviews3 answers
Difference between String, StringBuffer, and StringBuilder in Java
3 Answers
Follow the links below
http://www.c-sharpcorner.com/UploadFile/9a9e6f/what-is-the-difference-between-string-and-stringbuffer/
http://www.c-sharpcorner.com/UploadFile/9a9e6f/what-is-the-difference-between-stringbuffer-and-stringbuilde/
Gopi ChandPosted May 26, 2015, 10:00 AM EDT
http://www.techtamasha.com/difference-between-string-and-stringbufferstringbuilder-in-java/28
Munesh SharmaPosted Apr 15, 2014, 12:43 AM EDT
String object is immutable(i.e., string object can't be modifiable. If we want to change that string object internally one new string object will be creteted to perform the changes), whereas StringBuffer and StringBuilder are mutable(allows to change the string by append functionality).
Here StringBuffer is synchronized( which means it is thread safe and hence you can use it when you implement threads for your methods).And finally StringBuilder is not synchronized( which implies it is not thread safe).
Vanikumari MarojuPosted Jan 22, 2014, 4:11 AM EST

