/**
 * A simple application that prints the host associated with an
 * email address
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
public class EmailProcessor
{
    /**
     * The entry-point of the application
     *
     * @param args  The command-line arguments
     */
    public static void main(String[] args)
    {
       String      host;
       
       if ((args != null) && (args.length > 0))
       {
          try
          {
             host = EmailAddress.getHost(args[0]);
             System.out.println("Host: "+host);
          }
          catch (IllegalArgumentException iae)
          {
             System.out.println("Try another email address!");
          }
       }
    }
}
