Respuesta :

Scanner input is needed to be changed or added to correct the error. A Java class called Scanner is used to get input of primitive types like int, double, etc. and strings.

A class called Scanner may be found in the java.util package and is used to get input of primitive types like int, double, etc., as well as strings. Although it is the simplest method for reading input in a Java application, it is not very effective if you need an input method for situations where time is a factor, such as in competitive programming.

The preset object System.in, which represents the standard input stream, is typically passed when creating an object of the Scanner class. If we wish to read input from a file, we can pass an object of the class File.

The function to utilize is nextXYZ to read numerical values of a certain data type XYZ (). For instance, we can use nextShort to read a value of type short ().

To know more about scanner click here:

https://brainly.com/question/17102287

#SPJ4