/**
* Code illustrating problem that occurs when trying to
* obtain a String from the keyboard after "enter" has been
* pressed. 
*
* This is the example we played with in class where I was
* the 105 year old woman earning a million a year
*
*

* @author ???? - modified by Elizabeth Adams
* @version ???? - September 5, 20008
*/

import java.util.Scanner;

public class InputProblem
{
  
public static void main(String[] args)
   {
         String name;  
     
int age;      
     
double income;    
      Scanner keyboard;
           
            keyboard =
new Scanner(System.in);
         
      System.out.print (
"What is your age? ");
      age = keyboard.nextInt();
    
      System.out.print (
"What is your annual income? ");
      income = keyboard.nextDouble();
      
      System.out.print (
"What is your name? ");
      name = keyboard.nextLine();
           
             
//Note the use of the '*' delimiters to show
             // the user what was picked up as name
      System.out.println ('*' + name + '*');
      System.out.println ( name );
       
      System.out.println
              (
"Hello " + name +  ". Your age is " + age +
              
" and your income is $" + income);
   }
// end mail
}// end class