O'Reilly logo

Java 2™ Programmer Exam Cram™ 2 (Exam CX-310-035) by Marcus Green, Bill Brogden

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

The Thread Class

The Java java.lang.Thread class describes the required behavior of Thread objects. Thread objects are used to encapsulate and conceal the details of a particular operating system's approach to multithreading. The JVM creates and runs several threads to support even the simplest Java program. The threads are used to load class files, interpret operating system events, and start the execution of your program.

The Life of a Thread

Thread objects have a distinct lifecycle with four basic states: new, runnable, blocked, and dead (as shown in Figure 10.1). The transitions from new to runnable and from runnable to dead are simple and permanent; the transition between runnable and blocked occupies most of the Java programmer's attention. ...

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