Creating Threads

Java, unlike many other programming languages, provides native support for multithreading. This support is centered around the java.lang.Thread class, the java.lang.Runnable interface, and methods of the java.lang.Object class. Support is also provided through synchronized methods and statements.

The Thread class provides the capability to create objects of class Thread, each with their own separate flow of control. The Thread class encapsulates the data and methods associated with separate threads of execution and enables multithreading to be integrated within Java's object-oriented framework. The minimal multithreading support required of the Thread class (or other classes that support multithreading) is specified by the

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.