stringbuffer时线程安全的,因为他的append方法会有同步锁,stringbuilder时线程不安全的所以我们在单线程的时候使用stringbuilder在多线程的时候使用stringbuilder