Java Language Tutorial:

Java Language ThreadLocal

Remarks

Best used for objects which depend on internals during invoking a call, but are stateless otherwise, like SimpleDateFormat, Marshaller

For Random ThreadLocal usage, consider using ThreadLocalRandom

Java Language ThreadLocal Examples:

Related Java Language Tutorial Topics:

Other Tutorial Topics:

This modified content is an extract of the original Stack Overflow Documentation released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow. This topic was created and modified by the Stack Ovedrflow Contributor.