Welcome![Sign In][Sign Up]
Location:
Downloads WEB Code JSP/Java
Title: MultiThread Download
 Description: Program to create the main program threads, thread1 and thread2 three Thread, thread1 is ThreadUseExtends objects of a class, through inheritance Thread realize Thread, thread2 is ThreadUseRunnable objects of a class, by implementing Runnable interface implementation Thread, the main program main Thread to sleep 7 seconds and thread1 Thread to sleep 10 seconds, thread2 sleep 1 second, during the execution of the first executive main Thread, the main Thread start thread1, thread1 start, need sleep 10 seconds, then the main Thread to sleep 7 seconds, then the main Thread will wake up thread1 is still in a state of sleep, so thread1 was killed. Then the main thread start thread2, thread2 start, need sleep 1 second, then the main thread to sleep 7 seconds and then when main thread woke up thread2 have to wake up and the implementation of the completion, so the main thread found no thread2.
 To Search:
File list (Check if you may need any files):
MultiThread\MultiThread.java
MultiThread
    

CodeBus www.codebus.net