Suspending and Resuming Thread

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.

Synchronization multithreading in Java

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.

The use of the ThreadGroup Class in Java

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.

 

User and Daemon Threads in Java

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.

Runnable Interface in Java

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.

Page 2 of 3

About Us

Rekha SetiaRekha Setia is a passionate blogger of Extra Computer Notes. if you have any ideas or any request me @