Synchronizing access to SimpleDateFormat
Creating SimpleDateFormat is expensive. Don’t use this unless it’s done seldom. OK if you can live with a bit of blocking. Use if formatDate() is not used much. Fastest option IF you reuse threads (thread pool). Uses more memory than 2. and has higher startup overhead. For applications both 2. and 3. are viable options. … Read more