Java字符串各种连接方式性能比较
转贴来自:http://blog.csdn.net/bestseal/archive/2008/04/16/2296283.aspx
剑字有19种写法,Java中字符串连接也有好多种写法,比如要连接6个字符串,以下5种写法都是可以的,究竟哪种写法最简捷,哪种最高效呢。
public static String concat1(String s1, String s2, String s3, String s4, String s5, String s6) {
String result = “”;
result += s1;
resu[......]