3
Reply

Difference between String, StringBuffer, and StringBuilder in Java

Satheesh Reddy

Satheesh Reddy

Jan 21, 2014
13k
0

    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 Maroju
    January 22, 2014
    1

    Follow the links belowhttp://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 Chand
    May 26, 2015
    0

    http://www.techtamasha.com/difference-between-string-and-stringbufferstringbuilder-in-java/28

    Munesh Sharma
    April 15, 2014
    0