Java provides a bunch of methods to manage threads that we create. Few of most important methods are listed down below. MethodUsagegetName() Returns the thread name getPriority()Returns the thread priority sleep()Suspend a thread for a period of timejoin()Wait for a thread to terminateisAlive()Determines if the thread is still running Now let’s see how each of…… Continue reading Java Thread Methods
Tag: Threads
Introduction to Threads and Concurrency.
A thread is simply a sequence of programmed instructions that can be executed independently in CPU. A single process of a program can have several threads, these threads are executed parallelly at the same time within the same process. There are two type of processes based on the number of threads. Single-threaded processes. :- Only…… Continue reading Introduction to Threads and Concurrency.