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