All pastes #914273 Raw Edit

Someone

public java v1 · immutable
·published 2008-02-22 19:40 UTC
rendered paste body
package edu.msoe.phillijw.lab04.client;import java.io.IOException;import java.net.*;import java.util.*;public class Main{	/**	 * Begins the execution of the program and sets up the	 * 	MyClient object for use.	 * Date: 1/8/08	 * @param args Parameters passed into the program	 * @throws IOException	 */	public static void main(String[] args) throws IOException	{		showHelp();		Scanner in = new Scanner(System.in);		System.out.print(">");				while (in.hasNextLine())		{			String input = in.nextLine();						if (input.toLowerCase().startsWith("get"))			{				//get			}			else if (input.toLowerCase().startsWith("head"))			{				//head			}			else if (input.toLowerCase().startsWith("help"))			{				showHelp();			}			else			{				System.out.println("Invalid command");				System.out.print(">");			}		}				in.close();			}			/**	 * Displays the parameters and usage for the program	 * Date: 1/8/08	 */	private static void showHelp()	{		System.out.println("Commands: get, head, help");		System.out.println("Usage: get google.com:80 /");		System.exit(1);	}}