September 2011
Beginner
650 pages
15h 47m
English
Java’s multithreading system is built upon the Thread class and its companion interface, Runnable. Both are packaged in java.lang. Thread encapsulates a thread of execution. To create a new thread, your program will either extend Thread or implement the Runnable interface.
The Thread class defines several methods that help manage threads. Here are some of the more commonly used ones (we will be looking at these more closely as they are used):

All processes have at least one thread of execution, which is usually called the main thread, because it is the one that is executed when your program begins. Thus, ...
Read now
Unlock full access