摘要:
package test;import org.apache.commons.lang.StringUtils;public class CutString { //性能最差 public String testPlus() { String s = ""; for (int i = 0; i < 10000; i++) { s = s + String.valueOf(i); } return s; } //较好 public String testConcat() { String s = ""; for (int i = 0; i < 阅读全文
posted @ 2011-02-16 20:12
focusJ
阅读(57391)
评论(0)
推荐(2)
摘要:
package test;import java.text.DateFormat;import java.text.SimpleDateFormat;import java.text.ParseException;import java.util.Date;public class StringOrDate { public static String dateToString(Date date, String type) { String str = null; DateFormat format = new SimpleDateFormat("yyyy-MM-dd") 阅读全文
posted @ 2011-02-16 20:11
focusJ
阅读(6637)
评论(0)
推荐(0)

浙公网安备 33010602011771号