StringBuffer是线程安全的,每次操作字符串,String会生成一个新的对象,而StringBuffer不会;StringBuilder是非线程安全的

友情链接:String、StringBuffer与StringBuilder之间区别