|
2
|
+Scanner is a tool which allows us to take a value from the user. Scanner s = new Scanner(System.in);, that is the way to define it and to be able to use it. Depending on what the user is inputing, you could assign a variable to what the input will be; integer: int i = s.nextInt();, this is a good example for an integer.
|