The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: Essential Java Classes
Lesson: Threads: Doing Two or More Tasks At Once

Implementing a Thread

The run method gives a thread something to do. Its code implements the thread's running behavior. A threadís run method can do anything that can be encoded in statements: compute a list of prime numbers, sort some data, perform some animation.

The Thread class implements a generic thread that, by default, does nothing. The next two sections discuss techniques for providing a run method for a thread:


Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.