Check out example codes for "how to create a Scanner Object in java". It will help you in understanding the concepts better.

Code Example 1

import java.util.Scanner;

Code Example 2

Scanner console = new Scanner(System.in);

Learn ReactJs, React Native from akashmittal.com