import java.util.Scanner;

/**
 * Asks the user to guess a name.
 *
 * Demonstrates String input and comparing Strings.
 *
 * For more on the fairy tale, see:
 * http://en.wikipedia.org/wiki/Rumpelstiltskin
 *
 * @author Zach Tomaszewski.
 * @version 05 Feb 2008
 */
public class Rumpelstiltskin {

  public static void main(String[] args) {

    //get user to enter a name
    Scanner input = new Scanner(System.in);
    System.out.print("Can you guess my name? ");
    String name = input.nextLine();

    //see if they guessed the correct name
    if (name.equalsIgnoreCase("Rumpelstiltskin")) {
      System.out.println("Arrggh!!  Drat, you guessed it!");
    }else {
      System.out.println("No, that's not it.  Try again!");
    }

  }
}