Virtual thread in Java

In the tutorial Initializing and running a thread in Java, I introduced you to Java’s Thread class to create a new thread. Threads created by this Thread class are called platform threads and the number of platform threads that can be created is limited, depending… Read More

ThreadLocal in Java

The ThreadLocal class in Java is a class that allows us to store and retrieve the values of variables in the same thread. As long as it’s the same thread, you can store a value and retrieve it whenever we want. You can initialize objects… Read More