- StringBuffer is synchronized, where as StringBuilder is not.
- In single threaded environment, prefer StringBuilder, since it is faster than StringBuffer because it's not synchronized
- If your data is going to change by multiple threads, then StringBuffer is preferable.
This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)
Saturday, 19 July 2014
StringBuilder Vs StringBuffer
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment