Tag: string vs stringbuffer

String vs StringBuffer vs StringBuilder

April 26, 2011 · 2 min read
###### Three classes exist in java.lang package to manipulate strings - **[String](http://way2java.com/string-and-stringbuffer/introduction-immutable-nature-comparison/)**, **[StringBuffer](http://way2java.com/string-and-stringbuffer/stringbuffer-length-and-capacity/)** and **[StringBuilder](http://way2java.com/string-and-stringbuffer/string-stringbuffer-stringbuilder/)**. Even though all the three are used for manipulating strings only but they differ in many aspects and specifically used in the code where demanded. Following tables give the differences between these and when to use. Now let us tabulate the differences of String vs StringBuffer vs StringBuilder at a glance to know better.