Differences between StringBuffer and StringBuilder

Differences between StringBuffer and StringBuilder

    different:

    StringBuffer is thread-safe, with the synchronized keyword modifications

    StringBuilder is not thread safe

 

    StringBuffer StringBuilder running speed is not fast

 

    the same:

    Their default initial capacity is 16

Guess you like

Origin www.cnblogs.com/javaisbest/p/11701263.html