Every thread may perform different tasks. Sometimes, it becomes necessay to suspend the execution of a thread for a period of time. This can be done by using suspend() method of the class. We can restart the thread by using resume() method.stop() is used to stop the thread, it cannot be restarted again.
The mechanism by which access to a single resource by multiple thread is controlled is called synchronization.Method level synchronization is the way to manage your thread of execution.
ThreadGroup class is used to create the group of threads. Multithreading support Thread, ThreadGroup and Runnable interface. A thread can be created by using one approach first is extending thread or second is implementing the Runnable interface.
Java has two types of threads first is User Thread and second is Daemon Thread.A user thread will run its own independently of other threads.Daemon thread is subordinate to a user thread means a daemon thread will automatically terminate when no more user thread are running.
In Runnable state, the thread is ready to run and is waiting to be selected by the scheduler for running.When it gets the scheduler, the thread goes into the running state and the run() is called.