Java.lang Package classes
Java.lang Package extras
Java.lang Package Useful Resources
Selected Reading
- Java.lang - Void
- Java.lang - Throwable
- Java.lang - ThreadLocal
- Java.lang - ThreadGroup
- Java.lang - Thread
- Java.lang - System
- Java.lang - StringBuilder
- Java.lang - StringBuffer
- Java.lang - String
- Java.lang - StrictMath
- Java.lang - StackTraceElement
- Java.lang - Short
- Java.lang - SecurityManager
- Java.lang - RuntimePermission
- Java.lang - Runtime
- Java.lang - ProcessBuilder
- Java.lang - Process
- Java.lang - Package
- Java.lang - Object
- Java.lang - Number
- Java.lang - Math
- Java.lang - Long
- Java.lang - Integer
- Java.lang - InheritableThreadLocal
- Java.lang - Float
- Java.lang - Enum
- Java.lang - Double
- Java.lang - Compiler
- Java.lang - ClassLoader
- Java.lang - Class
- Java.lang - Character.UnicodeBlock
- Java.lang - Character.Subset
- Java.lang - Character
- Java.lang - Byte
- Java.lang - Boolean
- Java.lang - Home
Java.lang Package extras
Java.lang Package Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Java.lang - ThreadLocal
Java.lang.ThreadLocal Class
Introduction
The java.lang.ThreadLocal class provides thread-local variables.
Class Declaration
Following is the declaration for java.lang.ThreadLocal class −
pubpc class ThreadLocal<T> extends Object
Class constructors
Sr.No. | Constructor & Description |
---|---|
1 | ThreadLocal() This creates a thread local variable. |
Class methods
Sr.No. | Method & Description |
---|---|
1 | This method returns the value in the current thread s copy of this thread-local variable. |
2 | This method returns the current thread s "initial value" for this thread-local variable. |
3 | This method removes the current thread s value for this thread-local variable. |
4 | This method sets the current thread s copy of this thread-local variable to the specified value. |
Methods inherited
This class inherits methods from the following classes −
java.lang.Object