Java Thread Programming

Chapter 2 - A Simple Two-Thread Example

Java Thread Programming
Paul Hyde
  Copyright 1999 Sams Publishing

Summary
This chapter explores how to create a new thread by performing these tasks :
  Subclassing Thread
  Overriding the run() method of Thread to specify the statements to be executed by the new thread
  Creating a new instance of this subclass of Thread
  Spawning a new thread by invoking start() on this instance
Thats all there is to getting a second thread up and running in Java! The following chapters explore the complexities of threads and the coordination of the intercommunication that usually must occur among them.

Toc

Категории