Multithreading in java
The first program is a simple illustration of multithreading in java. The program has three threads A, B and C each of which prints the values from 1 to 5. Each run of the program gives a different ordering of output based on the switching of control between threads.
The second program illustrates the use of yield, stop and sleep methods.
The third program illustrates the use of synchronized keyword which is used to synchronize threads
File listTips: You can preview the content of files by clicking file names^_^
|ThreadTest.java||641.00 B||2013-12-16 01:26|
|ThreadTest1.java||767.00 B||2013-12-16 01:28|
|ThreadTest2.java||430.00 B||2013-12-16 01:28|
- Page 1
- Total 1