Threads

by Michael Thomas

(Tutorial Home Page)

by Michael Thomas

(Tutorial Home Page)

Topic Notes
  2 ways to create a Thread:
  • implement Runnable
  • extend Thread
implement Runnable
  • Must override:  public void run()
 
  • The way Threads work is vendor and platform dependent.  Therefore, you can not predict the exact way threads will work.
start()  
wait()  
notify(), notifyAll()  
suspend()