Introduction
The Scanner class helps your program read input from the keyboard or other sources easily.
When you want to ask the user to type their name.
When you need to get numbers or words from the user during the program.
When you want to read data from a file or text input.
When you want to make your program interactive by accepting user input.