1: /** 2: This program runs two threads in parallel. 3: */ 4: public class ThreadTester 5: { 6: public static void main(String[] args) 7: { 8: Runnable r1 = new GreetingProducer("Hello, World!"); 9: Runnable r2 = new GreetingProducer("Goodbye, World!"); 10: 11: Thread t1 = new Thread(r1); 12: Thread t2 = new Thread(r2); 14: t1.start(); 15: t2.start(); 16: } 17: }