import java.util.Scanner;

/**
 * A program that demonstrates reading in various information
 * from the console.
 * 
 * @author Sara Sprenkle
 */
public class ConsoleUsingScannerDemo {

	/**
	 * @param args
	 *            not used in this program
	 */
	public static void main(String[] args) {

		long tempLong;

		// Create the Scanner object, passing in the console input System.in
        Scanner scanner = new Scanner(System.in);
        
        System.out.println("Directions:");
        System.out.println("\tEnter an integer followed by a space and then some more characters.");
        System.out.println("\tThen, enter a big integer (a long).");

        // read in an integer and a String
        int i = scanner.nextInt();
        String restOfLine = scanner.nextLine();
        
        // read in a long
        tempLong = scanner.nextLong(); 
        
        scanner.close();
        
        System.out.println("Entered ");
        System.out.println("\tinteger: " + i);
        System.out.println("\trest of line: " + restOfLine);
        System.out.println("\tlong: " + tempLong);

   }
}
