字符串常用的操作就是拼接,特别是SQL语句的拼接. 做了个简单的试验,它们之间的差别惊人! StringBuffer: public void testStringBuffer() { long start = System.currentTimeMillis(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < COUNT; i++) { sb.append(STR_INIT); } long end = System.cur…