There are two techniques for creating threads in a Java program.
One approach is to create a new class that is derived from the Thread class and
to override its run() method.
An alternative—and more commonly used—
technique is to define a class that implements the Runnable interface.
The Runnable interface is defined as follows: