O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What Are Threads?

A unique property of Java is its built-in support for threads. Threads allow you to do many tasks simultaneously, or at least it seems that the tasks are working simultaneously. As you'll see later in this chapter, most of the time, there is actually only one thread running at a time. A thread is really nothing but a sequential flow of control within a program. In multithreaded programs, there are multiple flows of control. For the purposes of this chapter, a "flow of control" is referred to as a task.

If an application could only perform a new task when another task was completed, your applications would be severely limited. Fortunately, Java has built-in thread support that allows programmers to schedule multiple tasks to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required