【发布时间】:2014-03-10 11:14:56
【问题描述】:
我遇到this article 并感到困惑
在我们的项目中,有几个地方我们使用 ThreadLocal 来构造 ThreadLocal 变量
在其他几个地方,我们正在私有本地方法中构造一个新对象 SimpleDateFormat。
例子,
private Date getConvertedDate(String Date){
SimpleDateFormat sdf = new SimpleDateFormat(); --> It is thread safe or not
}
谁能详细解释一下?
谢谢。
【问题讨论】:
标签: java thread-safety