// 在单线程更高效,但在多线程中不安全
everything is as same as StringBuffer
// 在多线程更好,但不够高效,在多线程中更安全
// 加了lock功能,防止多线程同时修改某个string引起conflict
StringBuffer s = new StringBuffer();
// original capacity is 16, length is 0
StringBuffer s = new StringBuffer("abc");
/// current capactity is 16+3, length is 3
s.append("de")
// current capacity is 19, length is 3+2