ICS491 - Spring 2007 Concurrent and High-Performance Programming
Several programming languages have provided constructs/abstractions for writing concurrent programs Java does it like it does everything else, by providing a Thread class "
! !
Modula, Ada, etc.
Note that in this class we use J2SE 1.5.0
You create a thread object Then you can start the thread
To create a thread, you can extend the thread class and override its “run()” method class MyThread extends Thread { public void run() { ... } ... } myThread t = new MyThread();
Example public class MyThread extends Thread { public void run() { for (int i=0; i
Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.