Java SE 5.0: What's the difference between a StringBuffer and StringBuilder?

What's the difference between a StringBuffer and StringBuilder?

The StringBuilder class was introduced with JDK 5.0. Essentially, a StringBuffer is a thread-safe version of StringBuilder. If you are only adding/removing characters from a single-thread, the StringBuilder implementation will be faster. If you are using multiple threads to add and remove characters, use StringBuffer.

Comments

Popular posts from this blog

Installing Bugzilla on Windows

Online Hindi Radio Stations

Copy/Paste the block of text in vi/vim