/* Java application that 
** (1) creates a thread whose "resident runnable" is
**     an instance of PrintGrisGrop,
** (2) starts that thread,
** (3) calls join() on that thread,
** (4) runs loop that prints "Blorp" several times.
**
** The point is to demonstrate that execution cannot
** proceed past the call to join() until the specified
** thread has completed its execution.  Hence, "Blorp"
** will not be printed until after the thread has
** finished printing its meaningless string.
*/

public class GrisGrop3 {
   public static void main(String[] args) throws InterruptedException {
      Runnable grisGropObj = new PrintGrisGrop();
      Thread grisGropThread = new Thread(grisGropObj);
      grisGropThread.start();
      grisGropThread.join();
      for (int i = 0; i != 10; i++) {
         System.out.println("Blorp!");
      }
   }
}