i usually use scanner class in java to read inputs if they are to be read from a single line where the numbers/strings are separated by spaces
like 2 3 4 5
in most of such cases i encounter runtime error(nzec)
after a lot of trials…i realized that the following part of the code was the cause of the error
why is it causing an error??
are there any alternatives?