Threads and Processes

This section describes the classes and interfaces of java.lang that support multithreading. Chapter 8, “Threads,” covers the important ones in more detail. It also covers the Process class, which is used to manipulate processes that are executed using the System.exec() methods.

Runnable

The Runnable interface provides a common approach to identifying the code to be executed as part of an active thread. It consists of a single method, run(), which is executed when a thread is activated. The Runnable interface is implemented by the Thread class and by other classes that support threaded execution.

Thread

The Thread class is used to construct and access individual threads of execution that are executed as part of a multithreaded ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.