Prev Next

Java / Strings

Difference between StringBuffer and StringBuilder.

All the methods in StringBuffer is synchronized whereas in StringBuilder, it is not synchronized.

StringBuffer is threadsafe while StringBuilder is not. If you need to manipulate a string in a single thread, use StringBuilder instead.

More Related questions...

Show more question and Answers...


Comments & Discussions