Java User Input

The Scanner class is used to get user input, and it is found in the java.util package. Java Scanner class allows the user to take input from the console.

Code :