两者均继承自AbstractStringBuilder。
StringBuffer是线程安全的,所有公开方法均为Synchronized。
所以多线程环境,优先使用StringBuffer。单线程环境优先使用StringBuilder