Scanner input = new Scanner(System.in);
This is calling a scanner and telling that it should be used in the console "System.in".
String userInput = input.nextLine();
This line is taking the value u inserted in the console and saving in a variable named "userInput"You can add this
System.out.println("the inserted value is : " + userInput);
And it will print in the console the value you inserted