01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
package horstmann.ch09_greeting;
/**
   This program runs two threads in parallel.
 */
public class ThreadTester
{
  public static void main(String[] args)
  {
    Runnable r1 = new GreetingProducer("Hello, World!");
    Runnable r2 = new GreetingProducer("Goodbye, World!");

    Thread t1 = new Thread(r1);
    Thread t2 = new Thread(r2);

    t1.start();
    t2.start();
  }
}