问题:
This question already has an answer here: 这个问题在这里已有答案:
Please tell with a code example why is SimpleDateFormat not threadsafe. 请告诉代码示例为什么SimpleDateFormat不是线程安全的。 What is the problem in this class? 这堂课有什么问题? Is The problem with format function of SimpleDateFormat ? SimpleDateFormat的格式功能有问题吗? Please give a code which demonstrates this fault in class. 请给出一个在课堂上演示此错误的代码。
FastDateFormat is threadsafe. FastDateFormat是线程安全的。 Why? 为什么? what is the difference b/w the SimpleDateFormat and FastDateFormat? b / w SimpleDateFormat和FastDateFormat有什么区别?
Please explain with a code which demonstrates this issue? 请用解释此问题的代码解释一下?
解决方案:
参考一: https://stackoom.com/question/ShbX参考二: Why is Java's SimpleDateFormat not thread-safe? [duplicate]