Java Multiple Threads

After going through the Threads Tutorial and Basics of Java Threads, we have seen how to create threads, start threads and sleep (inactivate) threads in Creating and Spawning Threads.

In Creating and Spawning Threads program, only one thread is created and executed. Now let us create two threads and activate them simultaneously. Also to learn, to activate one thread at a time and when one is activate, the other should go into inactivate (blocked) state.

Two programs are given in the following link on lightweight and heavyweight threads.

1. Heavyweight and Lightweight Threads

For all programs on multithreading
1. Multithreading at a Glance

Leave a Comment

Your email address will not be published.