/**
 * An example that illustrates an important consideration when
 * using the next___() methods.
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
public class InconvenienceExample
{
    public static void main(String[] args)
    {
        int    age;
        String name;
        
        // If you run this program you won't be able to enter your
        // name because the return you enter after your age will
        // be considered the "next line"
        JMUConsole.open();        
        JMUConsole.print("Enter your age: ");
        age = JMUConsole.nextInt();
        JMUConsole.print("Enter your name: ");
        name = JMUConsole.nextLine();
        JMUConsole.close();
    }
}

