1. 程式人生 > >多執行緒下SimpleDataFormat的使用

多執行緒下SimpleDataFormat的使用

static ThreadLocal<DateFormat> safeSaf = new ThreadLocal<DateFormat>{
       @Override
       protected SimpleDateFormat initialValue(){
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
}
};