字符串拼接 普通方式 public class StringDemo2 { public static void main(String[] args) { // 表示获取从1970-01-01 00:00:00到现在的毫秒值 long begin = System.currentTimeMillis(); // 拼接字符串家,将100000个a拼接在一起 String str = ""; for (int i = 0; i < 100000; i++) { st
一.Java代码案例 @Test public void test10(){ int planet=7; String event="a disturbance in the Force"; String result=MessageFormat.format("At {1,time} on {1,date},there was {2} on planet {0,number,integer}", pl
测试代码: public class StringJoinTest { public static void main(String[] args) { int count = 10000; long begin, end, time; begin = System.currentTimeMillis(); testString(count); end = System.currentTimeMillis(); time = end - begin; System.out.println("拼接