Luxoft Interview Question

What is the use case of ThreadLocal?

Interview Answer

Anonymous

May 14, 2023

1. To make any object as thread-safe, e.g. SimpleDateFormat 2. To hold some request context variables (e.g. user_id, transaction_id)

1