 Let's take another look at the program that calculates age in days. Again, there's nothing wrong with it. It does exactly what it says it will do. However, if someone isn't 21 years old, let's say they're 25, they would need to edit and recompile the program to get the correct answer for their age. Wouldn't it be nice if we could ask the person using the program to enter their age from the keyboard? Then it would work for anyone of any age. That's what we're going to do in this version of the program. In order to get user input, we need to use a library called scanner, which is in the java.util package, and we have to import that into our program. This import and any other imports you do must be at the beginning of your program. On line 11, we have an assignment statement. Let's look at the right-hand side. It says to create a new scanner object that reads from system.in, which is the name of the standard input device, your keyboard. This object is assigned to a variable named input. Input is not a reserved word. It's a meaningful name. Just as we have to proceed variables like age in days and age in years with int to tell what type of variables they are, we have to proceed the variable name input with its data type. It's a scanner object. Here we're using print instead of println. This prints the text without going to a new line, because we want the input cursor to appear on the same line as the prompt, not on a new line. Second, we have a space before the closing quote of the prompt string. This puts extra space between the input prompt and the input cursor, and it just looks better when you run the program. In the next line, we get down to business. The right-hand side invokes the next int method of the input scanner, which reads the next integer from the keyboard. This gets assigned to age in years. In the next statement, we take that age in years times 365 and assign it to age in days, and conclude the program by printing out the results. Let's run the program. Compile it first, and then run it. If your age in years is 30, that's the approximate number of days. Let's run it again for someone who's 47 years old, and now we have one program that will work for any of our people who are using it. You may be wondering, what happens if you run the program, and instead of entering a number, you enter a word, like F-I-V-E. Answer, the program crashes. The error message says you have an input mismatch exception. There was a mismatch between what you typed and what next int wanted. For now, don't worry about handling this sort of bad input. We'll learn more about exceptions and how to handle them later in the course. In summary, to get user input, you have to import the scanner class. You have to create a new scanner object that reads from the keyboard and assign it to a scanner variable, and then use that scanner's next int method if you need an integer. Or if you need a double value, use next double instead of next int, and that's next double with a capital D.