Java: Threads

Contributor Icon Contributed by William_Wilson  
Tag Icon Tagged: Java programming  

How to implement your own dynamic class threads, and run them.


simply copy the 2 code segments and replace the //thread code with your desired code to thread.

//private Thread class:

private class ThreadMyProg implements Runnable{
public void run(){
//thread code
}
}

//how to call this class and run it:

ThreadMyProg aThread = new ThreadMyProg();
new Thread(aThread).start();

Questions/Comments: william_a_wilson@hotmail.com
-William. ยง (marvin_gohan)

 

No Comments -


No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment -