[Solved] What is thread local when we use this? [duplicate]


it doesn’t need to be public

but it is essentially a Map where you can only get for the current Thread as key and when the value hasn’t been set yet it is initialized automatically

this implements thread local storage so you can have “public static” variables without needing to synchronize on them

solved What is thread local when we use this? [duplicate]