// From A Beginning Programmer's Guide to Java
// http://beginwithjava.blogpsot.com/

// Used in the article 'Import Statements'
// at http://beginwithjava.blogspot.com/2008/06/import-statements.html

// Demonstrates the use of import to obtain access to a class
// outside of java.lang--in this case, the Scanner class.
// See the article for more information.
// by Mark Graybill, June 2008

import java.util.Scanner;

public class ScannerTest{
  public static void main(String arg[]){

    // scanner gets its input from the console.
    Scanner scanner = new Scanner(System.in);
    String name = "";

    // Get the user's name.
    System.out.print("Your name, adventurer? >");
    name = scanner.next();
    System.out.println();

    // Print their name in a a message.
    System.out.println("Welcome, " + name + " to  Javaland!");
  }
}