Synchronizing access to SimpleDateFormat
问题 The javadoc for SimpleDateFormat states that SimpleDateFormat is not synchronized. "Date formats are not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally." But what is the best approach to using an instance of SimpleDateFormat in a multi threaded environment. Here are a few options I have thought of, I have used options 1 and 2 in the past but I am curious to know if there