+ 1
What is the difference between the StringBuffer and StringBuilder class?
When are they to be used?
5 Answers
+ 4
I have answered this sometime back. Hope you find it useful.
https://www.sololearn.com/discuss/2141134/?ref=app
+ 2
StringBuffer is synchronized and StringBuilder is not synchronized.
+ 1
It depends on what you're trying to achieve with either one. If you desire to work with faster speed then the StringBuilder class is ideal. If you desire thread safety then the StringBuffer class is ideal. More answers are welcome of course.
+ 1
Thanks Avinesh! I will check out the link.
+ 1
I just checked out the link and the answer given is detailed. Thanks! Prathvi thanks for your answer too